File indexing completed on 2025-01-18 09:42:46
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_NUMERIC_CONVERSION_DETAIL_INT_FLOAT_MIXTURE_FLC_12NOV2002_HPP
0011 #define BOOST_NUMERIC_CONVERSION_DETAIL_INT_FLOAT_MIXTURE_FLC_12NOV2002_HPP
0012
0013 #include "boost/config.hpp"
0014 #include "boost/limits.hpp"
0015
0016 #include "boost/numeric/conversion/int_float_mixture_enum.hpp"
0017 #include "boost/numeric/conversion/detail/meta.hpp"
0018
0019 #include "boost/type_traits/integral_constant.hpp"
0020
0021 namespace boost { namespace numeric { namespace convdetail
0022 {
0023
0024 typedef boost::integral_constant<int_float_mixture_enum, integral_to_integral> int2int_c ;
0025 typedef boost::integral_constant<int_float_mixture_enum, integral_to_float> int2float_c ;
0026 typedef boost::integral_constant<int_float_mixture_enum, float_to_integral> float2int_c ;
0027 typedef boost::integral_constant<int_float_mixture_enum, float_to_float> float2float_c ;
0028
0029
0030
0031
0032
0033
0034
0035 template<class T,class S>
0036 struct get_int_float_mixture
0037 {
0038 typedef mpl::bool_< ::std::numeric_limits<S>::is_integer > S_int ;
0039 typedef mpl::bool_< ::std::numeric_limits<T>::is_integer > T_int ;
0040
0041 typedef typename
0042 for_both<S_int, T_int, int2int_c, int2float_c, float2int_c, float2float_c>::type
0043 type ;
0044 } ;
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055 template<class IntFloatMixture, class Int2Int, class Int2Float, class Float2Int, class Float2Float>
0056 struct for_int_float_mixture
0057 {
0058 typedef typename
0059 ct_switch4<IntFloatMixture
0060 ,int2int_c, int2float_c, float2int_c
0061 ,Int2Int , Int2Float , Float2Int , Float2Float
0062 >::type
0063 type ;
0064 } ;
0065
0066 } } }
0067
0068 #endif
0069
0070
0071
0072