Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
2 #ifndef BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED
3 #define BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED
5 // Copyright Aleksey Gurtovoy 2001-2004
7 // Distributed under the Boost Software License, Version 1.0.
8 // (See accompanying file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt)
11 // See http://www.boost.org/libs/mpl for documentation.
13 // $Source: /cvsroot/boost/boost/boost/mpl/aux_/lambda_support.hpp,v $
14 // $Date: 2005/08/25 16:27:21 $
17 #include <boost/mpl/aux_/config/lambda.hpp>
19 #if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT)
21 # define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) /**/
22 # define BOOST_MPL_AUX_LAMBDA_SUPPORT(i,name,params) /**/
26 # include <boost/mpl/int_fwd.hpp>
27 # include <boost/mpl/aux_/yes_no.hpp>
28 # include <boost/mpl/aux_/na_fwd.hpp>
29 # include <boost/mpl/aux_/preprocessor/params.hpp>
30 # include <boost/mpl/aux_/preprocessor/enum.hpp>
31 # include <boost/mpl/aux_/config/msvc.hpp>
32 # include <boost/mpl/aux_/config/workaround.hpp>
34 # include <boost/preprocessor/tuple/to_list.hpp>
35 # include <boost/preprocessor/list/for_each_i.hpp>
36 # include <boost/preprocessor/inc.hpp>
37 # include <boost/preprocessor/cat.hpp>
39 # define BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC(R,typedef_,i,param) \
40 typedef_ param BOOST_PP_CAT(arg,BOOST_PP_INC(i)); \
43 // agurt, 07/mar/03: restore an old revision for the sake of SGI MIPSpro C++
44 #if BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
46 # define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \
47 typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_<i> arity; \
48 BOOST_PP_LIST_FOR_EACH_I_R( \
50 , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \
52 , BOOST_PP_TUPLE_TO_LIST(i,params) \
56 template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \
57 : name< BOOST_MPL_PP_PARAMS(i,U) > \
63 # define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
64 BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \
67 #elif BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION)
68 // agurt, 18/jan/03: old EDG-based compilers actually enforce 11.4 para 9
69 // (in strict mode), so we have to provide an alternative to the
70 // MSVC-optimized implementation
72 # define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
73 typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_<i> arity; \
74 BOOST_PP_LIST_FOR_EACH_I_R( \
76 , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \
78 , BOOST_PP_TUPLE_TO_LIST(i,params) \
83 # define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \
84 BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
86 template< BOOST_MPL_PP_PARAMS(i,typename T) > \
87 struct name<BOOST_MPL_PP_PARAMS(i,T)>::rebind \
89 template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \
90 : name< BOOST_MPL_PP_PARAMS(i,U) > \
95 #else // __EDG_VERSION__
97 namespace boost { namespace mpl { namespace aux {
98 template< typename T > struct has_rebind_tag;
101 # define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
102 typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_<i> arity; \
103 BOOST_PP_LIST_FOR_EACH_I_R( \
105 , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \
107 , BOOST_PP_TUPLE_TO_LIST(i,params) \
109 friend class BOOST_PP_CAT(name,_rebind); \
110 typedef BOOST_PP_CAT(name,_rebind) rebind; \
113 #if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
114 # define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \
115 template< BOOST_MPL_PP_PARAMS(i,typename T) > \
116 ::boost::mpl::aux::yes_tag operator|( \
117 ::boost::mpl::aux::has_rebind_tag<int> \
118 , name<BOOST_MPL_PP_PARAMS(i,T)>* \
120 ::boost::mpl::aux::no_tag operator|( \
121 ::boost::mpl::aux::has_rebind_tag<int> \
122 , name< BOOST_MPL_PP_ENUM(i,::boost::mpl::na) >* \
125 #elif !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
126 # define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \
127 template< BOOST_MPL_PP_PARAMS(i,typename T) > \
128 ::boost::mpl::aux::yes_tag operator|( \
129 ::boost::mpl::aux::has_rebind_tag<int> \
130 , ::boost::mpl::aux::has_rebind_tag< name<BOOST_MPL_PP_PARAMS(i,T)> >* \
134 # define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) /**/
137 # if !defined(__BORLANDC__)
138 # define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \
139 BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
141 BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \
142 class BOOST_PP_CAT(name,_rebind) \
145 template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \
146 : name< BOOST_MPL_PP_PARAMS(i,U) > \
151 # define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \
152 BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
154 BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \
155 class BOOST_PP_CAT(name,_rebind) \
158 template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \
160 typedef typename name< BOOST_MPL_PP_PARAMS(i,U) >::type type; \
163 # endif // __BORLANDC__
165 #endif // __EDG_VERSION__
167 #endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT
169 #endif // BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED