diff --git a/include/boost/geometry/extensions/gis/geographic/strategies/dms_parser.hpp b/include/boost/geometry/extensions/gis/geographic/strategies/dms_parser.hpp index 5db5fcb85..af746e821 100644 --- a/include/boost/geometry/extensions/gis/geographic/strategies/dms_parser.hpp +++ b/include/boost/geometry/extensions/gis/geographic/strategies/dms_parser.hpp @@ -38,7 +38,11 @@ #include #include + +#if !defined(BOOST_GEOMETRY_NO_LEXICAL_CAST) #include +#endif // !defined(BOOST_GEOMETRY_NO_LEXICAL_CAST) + #include #include @@ -129,7 +133,11 @@ namespace strategy template static inline void assign_dms(dms_value& dms, std::string& value, bool& has_value) { +#if !defined(BOOST_GEOMETRY_NO_LEXICAL_CAST) dms.dms[I] = boost::lexical_cast(value.c_str()); +#else // !defined(BOOST_GEOMETRY_NO_LEXICAL_CAST) + dms.dms[I] = std::atof(value.c_str()); +#endif // !defined(BOOST_GEOMETRY_NO_LEXICAL_CAST) dms.has_dms[I] = true; has_value = false; value.clear();