Chris@16: Chris@16: // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION Chris@16: Chris@16: // Copyright Aleksey Gurtovoy 2000-2004 Chris@16: // Chris@16: // Distributed under the Boost Software License, Version 1.0. Chris@16: // (See accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: // Chris@16: // See http://www.boost.org/libs/mpl for documentation. Chris@16: Chris@101: // $Id$ Chris@101: // $Date$ Chris@101: // $Revision$ Chris@16: Chris@16: #if !defined(BOOST_MPL_PREPROCESSING_MODE) Chris@16: # include Chris@16: # include Chris@16: #endif Chris@16: Chris@16: #if !defined(AUX778076_OP_PREFIX) Chris@16: # define AUX778076_OP_PREFIX AUX778076_OP_NAME Chris@16: #endif Chris@16: Chris@16: #define AUX778076_OP_ARITY 2 Chris@16: Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: Chris@16: #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ Chris@16: && !defined(BOOST_MPL_PREPROCESSING_MODE) Chris@16: Chris@16: # define BOOST_MPL_PREPROCESSED_HEADER AUX778076_OP_PREFIX.hpp Chris@16: # include Chris@16: Chris@16: #else Chris@16: Chris@16: # include Chris@16: # include Chris@16: Chris@16: namespace boost { namespace mpl { Chris@16: Chris@16: #if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) Chris@16: namespace aux { Chris@16: template< typename T, typename Shift, T n, Shift s > Chris@16: struct BOOST_PP_CAT(AUX778076_OP_PREFIX,_wknd) Chris@16: { Chris@16: BOOST_STATIC_CONSTANT(T, value = (n AUX778076_OP_TOKEN s)); Chris@16: typedef integral_c type; Chris@16: }; Chris@16: } Chris@16: #endif Chris@16: Chris@16: template<> Chris@16: struct AUX778076_OP_IMPL_NAME Chris@16: { Chris@16: template< typename N, typename S > struct apply Chris@16: #if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) Chris@16: : integral_c< Chris@16: typename N::value_type Chris@16: , ( BOOST_MPL_AUX_VALUE_WKND(N)::value Chris@16: AUX778076_OP_TOKEN BOOST_MPL_AUX_VALUE_WKND(S)::value Chris@16: ) Chris@16: > Chris@16: #else Chris@16: : aux::BOOST_PP_CAT(AUX778076_OP_PREFIX,_wknd)< Chris@16: typename N::value_type Chris@16: , typename S::value_type Chris@16: , N::value Chris@16: , S::value Chris@16: >::type Chris@16: #endif Chris@16: { Chris@16: }; Chris@16: }; Chris@16: Chris@16: }} Chris@16: Chris@16: #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS Chris@16: Chris@16: #undef AUX778076_OP_TAG_NAME Chris@16: #undef AUX778076_OP_IMPL_NAME Chris@16: #undef AUX778076_OP_ARITY Chris@16: #undef AUX778076_OP_PREFIX Chris@16: #undef AUX778076_OP_NAME Chris@16: #undef AUX778076_OP_TOKEN