File indexing completed on 2025-04-26 08:34:30
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_GEOMETRY_UTIL_NUMERIC_CAST_HPP
0010 #define BOOST_GEOMETRY_UTIL_NUMERIC_CAST_HPP
0011
0012 #include <boost/numeric/conversion/cast.hpp>
0013
0014 namespace boost { namespace geometry { namespace util
0015
0016 {
0017
0018 #ifndef DOXYGEN_NO_DETAIL
0019 namespace detail
0020 {
0021
0022
0023 template <typename Target, typename Source>
0024 struct numeric_caster
0025 {
0026 static inline Target apply(Source const& source)
0027 {
0028 return boost::numeric_cast<Target>(source);
0029 }
0030 };
0031
0032 }
0033 #endif
0034
0035
0036
0037 template <typename Target, typename Source>
0038 inline Target numeric_cast(Source const& source)
0039 {
0040 return detail::numeric_caster<Target, Source>::apply(source);
0041 }
0042
0043 }}}
0044
0045 #endif