merge new MPL version from 'mplbook' branch
[SVN r24874]
This commit is contained in:
1 parent
e2e70427cc
commit
1689c8ef83
1216 files changed
+89913
-36752
No files matched your search
@@ -1,33 +1,36 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// boost mpl/aux_/lambda_support.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2001-02
|
||||
// Aleksey Gurtovoy
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED
|
||||
|
||||
#include "boost/mpl/aux_/config/lambda.hpp"
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
#if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT)
|
||||
// $Source$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/config/lambda.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT)
|
||||
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) /**/
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i,name,params) /**/
|
||||
|
||||
#else
|
||||
|
||||
# include "boost/mpl/aux_/config/workaround.hpp"
|
||||
# include "boost/mpl/aux_/preprocessor/params.hpp"
|
||||
# include "boost/preprocessor/tuple/to_list.hpp"
|
||||
# include "boost/preprocessor/list/for_each_i.hpp"
|
||||
# include "boost/preprocessor/inc.hpp"
|
||||
# include "boost/preprocessor/cat.hpp"
|
||||
# include <boost/mpl/int_fwd.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/params.hpp>
|
||||
# include <boost/mpl/aux_/config/msvc.hpp>
|
||||
# include <boost/mpl/aux_/config/workaround.hpp>
|
||||
# include <boost/preprocessor/tuple/to_list.hpp>
|
||||
# include <boost/preprocessor/list/for_each_i.hpp>
|
||||
# include <boost/preprocessor/inc.hpp>
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC(R,typedef_,i,param) \
|
||||
typedef_ param BOOST_PP_CAT(arg,BOOST_PP_INC(i)); \
|
||||
@@ -37,7 +40,7 @@
|
||||
#if BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
|
||||
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \
|
||||
BOOST_STATIC_CONSTANT(int, arity = i); \
|
||||
typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_<i> arity; \
|
||||
BOOST_PP_LIST_FOR_EACH_I_R( \
|
||||
1 \
|
||||
, BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \
|
||||
@@ -63,7 +66,7 @@
|
||||
// MSVC-optimized implementation
|
||||
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
|
||||
BOOST_STATIC_CONSTANT(int, arity = i); \
|
||||
typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_<i> arity; \
|
||||
BOOST_PP_LIST_FOR_EACH_I_R( \
|
||||
1 \
|
||||
, BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \
|
||||
@@ -87,8 +90,12 @@ struct name<BOOST_MPL_PP_PARAMS(i,T)>::rebind \
|
||||
|
||||
#else // __EDG_VERSION__
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
template< typename T > struct has_rebind_tag;
|
||||
}}}
|
||||
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
|
||||
BOOST_STATIC_CONSTANT(int, arity = i); \
|
||||
typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_<i> arity; \
|
||||
BOOST_PP_LIST_FOR_EACH_I_R( \
|
||||
1 \
|
||||
, BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \
|
||||
@@ -99,10 +106,31 @@ struct name<BOOST_MPL_PP_PARAMS(i,T)>::rebind \
|
||||
typedef BOOST_PP_CAT(name,_rebind) rebind; \
|
||||
/**/
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \
|
||||
template< BOOST_MPL_PP_PARAMS(i,typename T) > \
|
||||
char operator|( \
|
||||
::boost::mpl::aux::has_rebind_tag<int> \
|
||||
, name<BOOST_MPL_PP_PARAMS(i,T)>* \
|
||||
); \
|
||||
/**/
|
||||
#elif !BOOST_WORKAROUND(BOOST_MSVC, <= 1200)
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \
|
||||
template< BOOST_MPL_PP_PARAMS(i,typename T) > \
|
||||
char operator|( \
|
||||
::boost::mpl::aux::has_rebind_tag<int> \
|
||||
, ::boost::mpl::aux::has_rebind_tag< name<BOOST_MPL_PP_PARAMS(i,T)> >* \
|
||||
); \
|
||||
/**/
|
||||
#else
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) /**/
|
||||
#endif
|
||||
|
||||
# if !defined(__BORLANDC__)
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
|
||||
}; \
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \
|
||||
class BOOST_PP_CAT(name,_rebind) \
|
||||
{ \
|
||||
public: \
|
||||
@@ -115,6 +143,7 @@ class BOOST_PP_CAT(name,_rebind) \
|
||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
|
||||
}; \
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \
|
||||
class BOOST_PP_CAT(name,_rebind) \
|
||||
{ \
|
||||
public: \
|
||||
@@ -127,6 +156,6 @@ class BOOST_PP_CAT(name,_rebind) \
|
||||
|
||||
#endif // __EDG_VERSION__
|
||||
|
||||
#endif // BOOST_MPL_NO_FULL_LAMBDA_SUPPORT
|
||||
#endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT
|
||||
|
||||
#endif // BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED
|
||||
Reference in new issue
Block a user