sl@0: sl@0: #if !defined(BOOST_PP_IS_ITERATING) sl@0: sl@0: ///// header body sl@0: sl@0: #ifndef BOOST_MPL_ARG_HPP_INCLUDED sl@0: #define BOOST_MPL_ARG_HPP_INCLUDED sl@0: sl@0: // Copyright Peter Dimov 2001-2002 sl@0: // Copyright Aleksey Gurtovoy 2001-2004 sl@0: // sl@0: // Distributed under the Boost Software License, Version 1.0. sl@0: // (See accompanying file LICENSE_1_0.txt or copy at sl@0: // http://www.boost.org/LICENSE_1_0.txt) sl@0: // sl@0: // See http://www.boost.org/libs/mpl for documentation. sl@0: sl@0: // $Source: /cvsroot/boost/boost/boost/mpl/arg.hpp,v $ sl@0: // $Date: 2004/09/21 13:48:07 $ sl@0: // $Revision: 1.12 $ sl@0: sl@0: #if !defined(BOOST_MPL_PREPROCESSING_MODE) sl@0: # include sl@0: # include sl@0: # include sl@0: # include sl@0: # include sl@0: #endif sl@0: sl@0: #include sl@0: #include sl@0: sl@0: #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ sl@0: && !defined(BOOST_MPL_PREPROCESSING_MODE) sl@0: sl@0: # define BOOST_MPL_PREPROCESSED_HEADER arg.hpp sl@0: # include sl@0: sl@0: #else sl@0: sl@0: # include sl@0: # include sl@0: # include sl@0: # include sl@0: # include sl@0: # include sl@0: sl@0: # include sl@0: # include sl@0: # include sl@0: sl@0: BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN sl@0: sl@0: // local macro, #undef-ined at the end of the header sl@0: #if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) sl@0: # define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \ sl@0: BOOST_MPL_PP_DEFAULT_PARAMS( \ sl@0: BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ sl@0: , param \ sl@0: , value \ sl@0: ) \ sl@0: /**/ sl@0: #else sl@0: # define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \ sl@0: BOOST_MPL_PP_PARAMS( \ sl@0: BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ sl@0: , param \ sl@0: ) \ sl@0: /**/ sl@0: #endif sl@0: sl@0: #define BOOST_PP_ITERATION_PARAMS_1 \ sl@0: (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) sl@0: #include BOOST_PP_ITERATE() sl@0: sl@0: sl@0: # undef AUX778076_ARG_N_DEFAULT_PARAMS sl@0: sl@0: BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int,arg) sl@0: sl@0: BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE sl@0: sl@0: #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS sl@0: #endif // BOOST_MPL_ARG_HPP_INCLUDED sl@0: sl@0: ///// iteration sl@0: sl@0: #else sl@0: #define i_ BOOST_PP_FRAME_ITERATION(1) sl@0: sl@0: #if i_ > 0 sl@0: sl@0: template<> struct arg sl@0: { sl@0: BOOST_STATIC_CONSTANT(int, value = i_); sl@0: typedef arg next; sl@0: BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) sl@0: BOOST_MPL_AUX_ARG_TYPEDEF(na, type) sl@0: sl@0: template< sl@0: AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na) sl@0: > sl@0: struct apply sl@0: { sl@0: typedef BOOST_PP_CAT(U,i_) type; sl@0: BOOST_MPL_AUX_ASSERT_NOT_NA(type); sl@0: }; sl@0: }; sl@0: sl@0: #else sl@0: sl@0: template<> struct arg<-1> sl@0: { sl@0: BOOST_STATIC_CONSTANT(int, value = -1); sl@0: BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) sl@0: BOOST_MPL_AUX_ARG_TYPEDEF(na, type) sl@0: sl@0: template< sl@0: AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na) sl@0: > sl@0: struct apply sl@0: { sl@0: typedef U1 type; sl@0: BOOST_MPL_AUX_ASSERT_NOT_NA(type); sl@0: }; sl@0: }; sl@0: sl@0: #endif // i_ > 0 sl@0: sl@0: #undef i_ sl@0: #endif // BOOST_PP_IS_ITERATING