// (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See library home page at http://www.boost.org/libs/numeric/conversion // // Contact the author at: fernando_cacciola@hotmail.com // #ifndef BOOST_NUMERIC_CONVERSION_DETAIL_INT_FLOAT_MIXTURE_FLC_12NOV2002_HPP #define BOOST_NUMERIC_CONVERSION_DETAIL_INT_FLOAT_MIXTURE_FLC_12NOV2002_HPP #include "boost/config.hpp" #include "boost/limits.hpp" #include "boost/numeric/conversion/int_float_mixture_enum.hpp" #include "boost/numeric/conversion/detail/meta.hpp" #include "boost/mpl/integral_c.hpp" namespace lslboost { namespace numeric { namespace convdetail { // Integral Constants for 'IntFloatMixture' typedef mpl::integral_c int2int_c ; typedef mpl::integral_c int2float_c ; typedef mpl::integral_c float2int_c ; typedef mpl::integral_c float2float_c ; // Metafunction: // // get_int_float_mixture::type // // Selects the appropriate Int-Float Mixture Integral Constant for the combination T,S. // template struct get_int_float_mixture { typedef mpl::bool_< ::std::numeric_limits::is_integer > S_int ; typedef mpl::bool_< ::std::numeric_limits::is_integer > T_int ; typedef typename for_both::type type ; } ; // Metafunction: // // for_int_float_mixture::type // // {Mixture} is one of the Integral Constants for Mixture, declared above. // {int_int,int_float,float_int,float_float} are aribtrary types. (not metafunctions) // // According to the value of 'IntFloatMixture', selects the corresponding type. // template struct for_int_float_mixture { typedef typename ct_switch4::type type ; } ; } } } // namespace lslboost::numeric::convdetail #endif // ///////////////////////////////////////////////////////////////////////////////////////////////