File indexing completed on 2025-01-18 09:42:47
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_NUMERIC_CONVERSION_CONVERTER_FLC_12NOV2002_HPP
0011 #define BOOST_NUMERIC_CONVERSION_CONVERTER_FLC_12NOV2002_HPP
0012
0013 #include "boost/numeric/conversion/conversion_traits.hpp"
0014 #include "boost/numeric/conversion/converter_policies.hpp"
0015
0016 #include "boost/numeric/conversion/detail/converter.hpp"
0017
0018 namespace boost { namespace numeric
0019 {
0020
0021 template<class T,
0022 class S,
0023 class Traits = conversion_traits<T,S>,
0024 class OverflowHandler = def_overflow_handler,
0025 class Float2IntRounder = Trunc< BOOST_DEDUCED_TYPENAME Traits::source_type> ,
0026 class RawConverter = raw_converter<Traits>,
0027 class UserRangeChecker = UseInternalRangeChecker
0028 >
0029 struct converter : convdetail::get_converter_impl<Traits,
0030 OverflowHandler,
0031 Float2IntRounder,
0032 RawConverter,
0033 UserRangeChecker
0034 >::type
0035 {
0036 typedef Traits traits ;
0037
0038 typedef typename Traits::argument_type argument_type ;
0039 typedef typename Traits::result_type result_type ;
0040
0041 result_type operator() ( argument_type s ) const { return this->convert(s) ; }
0042 } ;
0043
0044
0045
0046 template<class S,
0047 class OverflowHandler = def_overflow_handler,
0048 class Float2IntRounder = Trunc<S> ,
0049 class UserRangeChecker = UseInternalRangeChecker
0050 >
0051 struct make_converter_from
0052 {
0053 template<class T,
0054 class Traits = conversion_traits<T,S>,
0055 class RawConverter = raw_converter<Traits>
0056 >
0057 struct to
0058 {
0059 typedef converter<T,S,Traits,OverflowHandler,Float2IntRounder,RawConverter,UserRangeChecker> type ;
0060 } ;
0061
0062 } ;
0063
0064 } }
0065
0066 #endif
0067
0068