Back to home page

EIC code displayed by LXR

 
 

    


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

0001 
0002 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
0003 
0004 // Copyright Aleksey Gurtovoy 2000-2004
0005 //
0006 // Distributed under the Boost Software License, Version 1.0. 
0007 // (See accompanying file LICENSE_1_0.txt or copy at 
0008 // http://www.boost.org/LICENSE_1_0.txt)
0009 //
0010 // See http://www.boost.org/libs/mpl for documentation.
0011 
0012 // $Id$
0013 // $Date$
0014 // $Revision$
0015 
0016 #if !defined(BOOST_MPL_PREPROCESSING_MODE)
0017 #   include <boost/mpl/integral_c.hpp>
0018 #   include <boost/mpl/aux_/largest_int.hpp>
0019 #   include <boost/mpl/aux_/value_wknd.hpp>
0020 #endif
0021 
0022 #if !defined(AUX778076_OP_PREFIX)
0023 #   define AUX778076_OP_PREFIX AUX778076_OP_NAME
0024 #endif
0025 
0026 #include <boost/mpl/aux_/numeric_op.hpp>
0027 #include <boost/mpl/aux_/config/static_constant.hpp>
0028 #include <boost/mpl/aux_/config/use_preprocessed.hpp>
0029 
0030 #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
0031     && !defined(BOOST_MPL_PREPROCESSING_MODE)
0032 
0033 #   define BOOST_MPL_PREPROCESSED_HEADER AUX778076_OP_PREFIX.hpp
0034 #   include <boost/mpl/aux_/include_preprocessed.hpp>
0035 
0036 #else
0037 
0038 #   include <boost/mpl/aux_/config/workaround.hpp>
0039 #   include <boost/preprocessor/cat.hpp>
0040 
0041 
0042 namespace boost { namespace mpl {
0043 
0044 #if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC)
0045 namespace aux {
0046 template< typename T, T n1, T n2 >
0047 struct BOOST_PP_CAT(AUX778076_OP_PREFIX,_wknd)
0048 {
0049     BOOST_STATIC_CONSTANT(T, value = (n1 AUX778076_OP_TOKEN n2));
0050     typedef integral_c<T,value> type;
0051 };
0052 }
0053 #endif
0054 
0055 template<>
0056 struct AUX778076_OP_IMPL_NAME<integral_c_tag,integral_c_tag>
0057 {
0058     template< typename N1, typename N2 > struct apply
0059 #if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC)
0060         : integral_c<
0061               typename aux::largest_int<
0062                   typename N1::value_type
0063                 , typename N2::value_type
0064                 >::type
0065             , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
0066                   AUX778076_OP_TOKEN BOOST_MPL_AUX_VALUE_WKND(N2)::value
0067                 )
0068             >
0069 #else
0070         : aux::BOOST_PP_CAT(AUX778076_OP_PREFIX,_wknd)<
0071               typename aux::largest_int<
0072                   typename N1::value_type
0073                 , typename N2::value_type
0074                 >::type
0075             , N1::value
0076             , N2::value
0077             >::type
0078 #endif
0079     {
0080     };
0081 };
0082 
0083 }}
0084 
0085 #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
0086 
0087 #undef AUX778076_OP_TAG_NAME
0088 #undef AUX778076_OP_IMPL_NAME
0089 #undef AUX778076_OP_ARITY
0090 #undef AUX778076_OP_PREFIX
0091 #undef AUX778076_OP_NAME
0092 #undef AUX778076_OP_TOKEN