Back to home page

EIC code displayed by LXR

 
 

    


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

0001 
0002 #ifndef BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED
0003 #define BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED
0004 
0005 // Copyright Aleksey Gurtovoy 2001-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/int.hpp>
0018 #include <boost/mpl/limits/arity.hpp>
0019 #include <boost/mpl/aux_/config/dtp.hpp>
0020 #include <boost/mpl/aux_/preprocessor/params.hpp>
0021 #include <boost/mpl/aux_/arity.hpp>
0022 #include <boost/mpl/aux_/template_arity_fwd.hpp>
0023 #include <boost/mpl/aux_/config/ttp.hpp>
0024 #include <boost/mpl/aux_/config/lambda.hpp>
0025 #include <boost/mpl/aux_/config/static_constant.hpp>
0026 
0027 #if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
0028 #   define BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,type,name) \
0029 namespace aux { \
0030 template< BOOST_MPL_AUX_NTTP_DECL(int, N), BOOST_MPL_PP_PARAMS(i,type T) > \
0031 struct arity< \
0032       name< BOOST_MPL_PP_PARAMS(i,T) > \
0033     , N \
0034     > \
0035 { \
0036     BOOST_STATIC_CONSTANT(int \
0037         , value = BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
0038         ); \
0039 }; \
0040 } \
0041 /**/
0042 #else
0043 #   define BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,type,name) /**/
0044 #endif
0045 
0046 #   define BOOST_MPL_AUX_ARITY_SPEC(i,name) \
0047     BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,typename,name) \
0048 /**/
0049 
0050 
0051 #if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \
0052     && !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT)
0053 #   define BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(i, name) \
0054 namespace aux { \
0055 template< BOOST_MPL_PP_PARAMS(i,typename T) > \
0056 struct template_arity< name<BOOST_MPL_PP_PARAMS(i,T)> > \
0057     : int_<i> \
0058 { \
0059 }; \
0060 } \
0061 /**/
0062 #else
0063 #   define BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(i, name) /**/
0064 #endif
0065 
0066 
0067 #endif // BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED