PageRenderTime 28ms CodeModel.GetById 10ms app.highlight 15ms RepoModel.GetById 1ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp

http://hadesmem.googlecode.com/
C++ Header | 228 lines | 173 code | 46 blank | 9 comment | 0 complexity | 82bdd096ab6c3e104013058df4ebe02b MD5 | raw file
  1
  2// Copyright Aleksey Gurtovoy 2000-2004
  3//
  4// Distributed under the Boost Software License, Version 1.0. 
  5// (See accompanying file LICENSE_1_0.txt or copy at 
  6// http://www.boost.org/LICENSE_1_0.txt)
  7//
  8
  9// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header
 10// -- DO NOT modify by hand!
 11
 12namespace boost { namespace mpl {
 13
 14namespace aux {
 15
 16template<
 17      bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
 18    , bool C5 = false
 19    >
 20struct lambda_or
 21    : true_
 22{
 23};
 24
 25template<>
 26struct lambda_or< false,false,false,false,false >
 27    : false_
 28{
 29};
 30
 31template< typename Arity > struct lambda_impl
 32{
 33    template< typename T, typename Tag, typename Protect > struct result_
 34    {
 35        typedef T type;
 36        typedef is_placeholder<T> is_le;
 37    };
 38};
 39
 40template<> struct lambda_impl< int_<1> >
 41{
 42    template< typename F, typename Tag, typename Protect > struct result_
 43    {
 44        typedef lambda< typename F::arg1, Tag, false_ > l1;
 45        typedef typename l1::is_le is_le1;
 46        typedef aux::lambda_or<
 47              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value
 48            > is_le;
 49
 50        typedef bind1<
 51              typename F::rebind
 52            , typename l1::type
 53            > bind_;
 54
 55        typedef typename if_<
 56              is_le
 57            , if_< Protect, mpl::protect<bind_>, bind_ >
 58            , identity<F>
 59            >::type type_;
 60
 61        typedef typename type_::type type;
 62    };
 63};
 64
 65template<> struct lambda_impl< int_<2> >
 66{
 67    template< typename F, typename Tag, typename Protect > struct result_
 68    {
 69        typedef lambda< typename F::arg1, Tag, false_ > l1;
 70        typedef lambda< typename F::arg2, Tag, false_ > l2;
 71        
 72        typedef typename l1::is_le is_le1;
 73        typedef typename l2::is_le is_le2;
 74        
 75
 76        typedef aux::lambda_or<
 77              BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value
 78            > is_le;
 79
 80        typedef bind2<
 81              typename F::rebind
 82            , typename l1::type, typename l2::type
 83            > bind_;
 84
 85        typedef typename if_<
 86              is_le
 87            , if_< Protect, mpl::protect<bind_>, bind_ >
 88            , identity<F>
 89            >::type type_;
 90
 91        typedef typename type_::type type;
 92    };
 93};
 94
 95template<> struct lambda_impl< int_<3> >
 96{
 97    template< typename F, typename Tag, typename Protect > struct result_
 98    {
 99        typedef lambda< typename F::arg1, Tag, false_ > l1;
100        typedef lambda< typename F::arg2, Tag, false_ > l2;
101        typedef lambda< typename F::arg3, Tag, false_ > l3;
102        
103        typedef typename l1::is_le is_le1;
104        typedef typename l2::is_le is_le2;
105        typedef typename l3::is_le is_le3;
106        
107
108        typedef aux::lambda_or<
109              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
110            > is_le;
111
112        typedef bind3<
113              typename F::rebind
114            , typename l1::type, typename l2::type, typename l3::type
115            > bind_;
116
117        typedef typename if_<
118              is_le
119            , if_< Protect, mpl::protect<bind_>, bind_ >
120            , identity<F>
121            >::type type_;
122
123        typedef typename type_::type type;
124    };
125};
126
127template<> struct lambda_impl< int_<4> >
128{
129    template< typename F, typename Tag, typename Protect > struct result_
130    {
131        typedef lambda< typename F::arg1, Tag, false_ > l1;
132        typedef lambda< typename F::arg2, Tag, false_ > l2;
133        typedef lambda< typename F::arg3, Tag, false_ > l3;
134        typedef lambda< typename F::arg4, Tag, false_ > l4;
135        
136        typedef typename l1::is_le is_le1;
137        typedef typename l2::is_le is_le2;
138        typedef typename l3::is_le is_le3;
139        typedef typename l4::is_le is_le4;
140        
141
142        typedef aux::lambda_or<
143              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
144            > is_le;
145
146        typedef bind4<
147              typename F::rebind
148            , typename l1::type, typename l2::type, typename l3::type
149            , typename l4::type
150            > bind_;
151
152        typedef typename if_<
153              is_le
154            , if_< Protect, mpl::protect<bind_>, bind_ >
155            , identity<F>
156            >::type type_;
157
158        typedef typename type_::type type;
159    };
160};
161
162template<> struct lambda_impl< int_<5> >
163{
164    template< typename F, typename Tag, typename Protect > struct result_
165    {
166        typedef lambda< typename F::arg1, Tag, false_ > l1;
167        typedef lambda< typename F::arg2, Tag, false_ > l2;
168        typedef lambda< typename F::arg3, Tag, false_ > l3;
169        typedef lambda< typename F::arg4, Tag, false_ > l4;
170        typedef lambda< typename F::arg5, Tag, false_ > l5;
171        
172        typedef typename l1::is_le is_le1;
173        typedef typename l2::is_le is_le2;
174        typedef typename l3::is_le is_le3;
175        typedef typename l4::is_le is_le4;
176        typedef typename l5::is_le is_le5;
177        
178
179        typedef aux::lambda_or<
180              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
181            > is_le;
182
183        typedef bind5<
184              typename F::rebind
185            , typename l1::type, typename l2::type, typename l3::type
186            , typename l4::type, typename l5::type
187            > bind_;
188
189        typedef typename if_<
190              is_le
191            , if_< Protect, mpl::protect<bind_>, bind_ >
192            , identity<F>
193            >::type type_;
194
195        typedef typename type_::type type;
196    };
197};
198
199} // namespace aux
200
201template<
202      typename T
203    , typename Tag
204    , typename Protect
205    >
206struct lambda
207{
208    /// Metafunction forwarding confuses MSVC 6.x
209    typedef typename aux::template_arity<T>::type arity_;
210    typedef typename aux::lambda_impl<arity_>
211        ::template result_< T,Tag,Protect > l_;
212
213    typedef typename l_::type type;
214    typedef typename l_::is_le is_le;
215};
216
217BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda)
218
219template<
220      typename T
221    >
222struct is_lambda_expression
223    : lambda<T>::is_le
224{
225};
226
227}}
228