// Copyright 2005 Alexander Nasonov. // Distributed under 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) #ifndef FILE_boost_type_traits_floating_point_promotion_hpp_INCLUDED #define FILE_boost_type_traits_floating_point_promotion_hpp_INCLUDED #include #ifdef BOOST_NO_CV_SPECIALIZATIONS #include #include #include #include #include #include #endif // Should be the last #include #include namespace boost { namespace type_traits { namespace detail { #ifndef BOOST_NO_CV_SPECIALIZATIONS template struct floating_point_promotion { typedef T type; }; template<> struct floating_point_promotion { typedef double type; }; template<> struct floating_point_promotion { typedef double const type; }; template<> struct floating_point_promotion { typedef double volatile type; }; template<> struct floating_point_promotion { typedef double const volatile type; }; #else template struct floating_point_promotion : mpl::at< mpl::vector< T, double, double const, double volatile, double const volatile > , mpl::plus< is_same , mpl::multiplies< is_same , mpl::int_<2> > , mpl::multiplies< is_same , mpl::int_<3> > , mpl::multiplies< is_same, mpl::int_<4> > > > { }; #endif } } BOOST_TT_AUX_TYPE_TRAIT_DEF1( floating_point_promotion , T , BOOST_DEDUCED_TYPENAME boost::type_traits::detail::floating_point_promotion::type ) } #include #endif // #ifndef FILE_boost_type_traits_floating_point_promotion_hpp_INCLUDED