Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:41:38

0001 
0002 #ifndef BOOST_MPL_AUX_NUMERIC_CAST_HPP_INCLUDED
0003 #define BOOST_MPL_AUX_NUMERIC_CAST_HPP_INCLUDED
0004 
0005 // Copyright Aleksey Gurtovoy 2003-2004
0006 //
0007 // Distributed under the Boost Software License, Version 1.0. 
0008 // (See accompanying file LICENSE_1_0.txt or copy at 
0009 // http://www.boost.org/LICENSE_1_0.txt)
0010 //
0011 // See http://www.boost.org/libs/mpl for documentation.
0012 
0013 // $Id$
0014 // $Date$
0015 // $Revision$
0016 
0017 #include <boost/mpl/numeric_cast.hpp>
0018 #include <boost/mpl/apply_wrap.hpp>
0019 #include <boost/mpl/aux_/config/forwarding.hpp>
0020 
0021 namespace boost { namespace mpl { namespace aux {
0022 
0023 template<
0024       typename F
0025     , typename Tag1
0026     , typename Tag2
0027     >
0028 struct cast1st_impl
0029 {
0030     template< typename N1, typename N2 > struct apply
0031 #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
0032         : apply_wrap2< 
0033               F
0034             , typename apply_wrap1< BOOST_MPL_AUX_NUMERIC_CAST<Tag1,Tag2>,N1 >::type
0035             , N2
0036             >
0037     {
0038 #else
0039     {
0040     typedef typename apply_wrap2< 
0041               F
0042             , typename apply_wrap1< BOOST_MPL_AUX_NUMERIC_CAST<Tag1,Tag2>,N1 >::type
0043             , N2
0044             >::type type;
0045 #endif
0046     };
0047 };
0048 
0049 template<
0050       typename F
0051     , typename Tag1
0052     , typename Tag2
0053     >
0054 struct cast2nd_impl
0055 {
0056     template< typename N1, typename N2 > struct apply
0057 #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
0058         : apply_wrap2< 
0059               F
0060             , N1
0061             , typename apply_wrap1< BOOST_MPL_AUX_NUMERIC_CAST<Tag2,Tag1>,N2 >::type
0062             >
0063     {
0064 #else
0065     {
0066         typedef typename apply_wrap2< 
0067               F
0068             , N1
0069             , typename apply_wrap1< BOOST_MPL_AUX_NUMERIC_CAST<Tag2,Tag1>,N2 >::type
0070             >::type type;
0071 #endif
0072     };
0073 };
0074 
0075 }}}
0076 
0077 #endif // BOOST_MPL_AUX_NUMERIC_CAST_HPP_INCLUDED