123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229 |
- // Copyright Aleksey Gurtovoy 2000-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)
- //
- // Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header
- // -- DO NOT modify by hand!
- namespace boost { namespace mpl {
- namespace aux {
- template<
- bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
- , bool C5 = false
- >
- struct lambda_or
- : true_
- {
- };
- template<>
- struct lambda_or< false,false,false,false,false >
- : false_
- {
- };
- template< typename Arity > struct lambda_impl
- {
- template< typename T, typename Tag, typename Protect > struct result_
- {
- typedef T type;
- typedef is_placeholder<T> is_le;
- };
- };
- template<> struct lambda_impl< int_<1> >
- {
- template< typename F, typename Tag, typename Protect > struct result_
- {
- typedef lambda< typename F::arg1, Tag, false_ > l1;
- typedef typename l1::is_le is_le1;
- typedef aux::lambda_or<
- BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value
- > is_le;
- typedef bind1<
- typename F::rebind
- , typename l1::type
- > bind_;
- typedef typename if_<
- is_le
- , if_< Protect, mpl::protect<bind_>, bind_ >
- , identity<F>
- >::type type_;
- typedef typename type_::type type;
- };
- };
- template<> struct lambda_impl< int_<2> >
- {
- template< typename F, typename Tag, typename Protect > struct result_
- {
- typedef lambda< typename F::arg1, Tag, false_ > l1;
- typedef lambda< typename F::arg2, Tag, false_ > l2;
-
- typedef typename l1::is_le is_le1;
- typedef typename l2::is_le is_le2;
-
- typedef aux::lambda_or<
- BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value
- > is_le;
- typedef bind2<
- typename F::rebind
- , typename l1::type, typename l2::type
- > bind_;
- typedef typename if_<
- is_le
- , if_< Protect, mpl::protect<bind_>, bind_ >
- , identity<F>
- >::type type_;
- typedef typename type_::type type;
- };
- };
- template<> struct lambda_impl< int_<3> >
- {
- template< typename F, typename Tag, typename Protect > struct result_
- {
- typedef lambda< typename F::arg1, Tag, false_ > l1;
- typedef lambda< typename F::arg2, Tag, false_ > l2;
- typedef lambda< typename F::arg3, Tag, false_ > l3;
-
- typedef typename l1::is_le is_le1;
- typedef typename l2::is_le is_le2;
- typedef typename l3::is_le is_le3;
-
- typedef aux::lambda_or<
- BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value
- > is_le;
- typedef bind3<
- typename F::rebind
- , typename l1::type, typename l2::type, typename l3::type
- > bind_;
- typedef typename if_<
- is_le
- , if_< Protect, mpl::protect<bind_>, bind_ >
- , identity<F>
- >::type type_;
- typedef typename type_::type type;
- };
- };
- template<> struct lambda_impl< int_<4> >
- {
- template< typename F, typename Tag, typename Protect > struct result_
- {
- typedef lambda< typename F::arg1, Tag, false_ > l1;
- typedef lambda< typename F::arg2, Tag, false_ > l2;
- typedef lambda< typename F::arg3, Tag, false_ > l3;
- typedef lambda< typename F::arg4, Tag, false_ > l4;
-
- typedef typename l1::is_le is_le1;
- typedef typename l2::is_le is_le2;
- typedef typename l3::is_le is_le3;
- typedef typename l4::is_le is_le4;
-
- typedef aux::lambda_or<
- BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value
- > is_le;
- typedef bind4<
- typename F::rebind
- , typename l1::type, typename l2::type, typename l3::type
- , typename l4::type
- > bind_;
- typedef typename if_<
- is_le
- , if_< Protect, mpl::protect<bind_>, bind_ >
- , identity<F>
- >::type type_;
- typedef typename type_::type type;
- };
- };
- template<> struct lambda_impl< int_<5> >
- {
- template< typename F, typename Tag, typename Protect > struct result_
- {
- typedef lambda< typename F::arg1, Tag, false_ > l1;
- typedef lambda< typename F::arg2, Tag, false_ > l2;
- typedef lambda< typename F::arg3, Tag, false_ > l3;
- typedef lambda< typename F::arg4, Tag, false_ > l4;
- typedef lambda< typename F::arg5, Tag, false_ > l5;
-
- typedef typename l1::is_le is_le1;
- typedef typename l2::is_le is_le2;
- typedef typename l3::is_le is_le3;
- typedef typename l4::is_le is_le4;
- typedef typename l5::is_le is_le5;
-
- typedef aux::lambda_or<
- BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value
- > is_le;
- typedef bind5<
- typename F::rebind
- , typename l1::type, typename l2::type, typename l3::type
- , typename l4::type, typename l5::type
- > bind_;
- typedef typename if_<
- is_le
- , if_< Protect, mpl::protect<bind_>, bind_ >
- , identity<F>
- >::type type_;
- typedef typename type_::type type;
- };
- };
- } // namespace aux
- template<
- typename T
- , typename Tag
- , typename Protect
- >
- struct lambda
- {
- /// Metafunction forwarding confuses MSVC 6.x
- typedef typename aux::template_arity<T>::type arity_;
- typedef typename aux::lambda_impl<arity_>
- ::template result_< T,Tag,Protect > l_;
- typedef typename l_::type type;
- typedef typename l_::is_le is_le;
- };
- BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda)
- template<
- typename T
- >
- struct is_lambda_expression
- : lambda<T>::is_le
- {
- };
- }}
|