File indexing completed on 2025-01-18 09:41:31
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 namespace boost { namespace mpl {
0013
0014 namespace aux {
0015
0016 template<
0017 bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
0018 , bool C5 = false
0019 >
0020 struct lambda_or
0021 : true_
0022 {
0023 };
0024
0025 template<>
0026 struct lambda_or< false,false,false,false,false >
0027 : false_
0028 {
0029 };
0030
0031 template< typename Arity > struct lambda_impl
0032 {
0033 template< typename T, typename Tag, typename Protect > struct result_
0034 {
0035 typedef T type;
0036 typedef is_placeholder<T> is_le;
0037 };
0038 };
0039
0040 template<> struct lambda_impl< int_<1> >
0041 {
0042 template< typename F, typename Tag, typename Protect > struct result_
0043 {
0044 typedef lambda< typename F::arg1, Tag, false_ > l1;
0045 typedef typename l1::is_le is_le1;
0046 typedef aux::lambda_or<
0047 BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value
0048 > is_le;
0049
0050 typedef bind1<
0051 typename F::rebind
0052 , typename l1::type
0053 > bind_;
0054
0055 typedef typename if_<
0056 is_le
0057 , if_< Protect, mpl::protect<bind_>, bind_ >
0058 , identity<F>
0059 >::type type_;
0060
0061 typedef typename type_::type type;
0062 };
0063 };
0064
0065 template<> struct lambda_impl< int_<2> >
0066 {
0067 template< typename F, typename Tag, typename Protect > struct result_
0068 {
0069 typedef lambda< typename F::arg1, Tag, false_ > l1;
0070 typedef lambda< typename F::arg2, Tag, false_ > l2;
0071
0072 typedef typename l1::is_le is_le1;
0073 typedef typename l2::is_le is_le2;
0074
0075
0076 typedef aux::lambda_or<
0077 BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value
0078 > is_le;
0079
0080 typedef bind2<
0081 typename F::rebind
0082 , typename l1::type, typename l2::type
0083 > bind_;
0084
0085 typedef typename if_<
0086 is_le
0087 , if_< Protect, mpl::protect<bind_>, bind_ >
0088 , identity<F>
0089 >::type type_;
0090
0091 typedef typename type_::type type;
0092 };
0093 };
0094
0095 template<> struct lambda_impl< int_<3> >
0096 {
0097 template< typename F, typename Tag, typename Protect > struct result_
0098 {
0099 typedef lambda< typename F::arg1, Tag, false_ > l1;
0100 typedef lambda< typename F::arg2, Tag, false_ > l2;
0101 typedef lambda< typename F::arg3, Tag, false_ > l3;
0102
0103 typedef typename l1::is_le is_le1;
0104 typedef typename l2::is_le is_le2;
0105 typedef typename l3::is_le is_le3;
0106
0107
0108 typedef aux::lambda_or<
0109 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
0110 > is_le;
0111
0112 typedef bind3<
0113 typename F::rebind
0114 , typename l1::type, typename l2::type, typename l3::type
0115 > bind_;
0116
0117 typedef typename if_<
0118 is_le
0119 , if_< Protect, mpl::protect<bind_>, bind_ >
0120 , identity<F>
0121 >::type type_;
0122
0123 typedef typename type_::type type;
0124 };
0125 };
0126
0127 template<> struct lambda_impl< int_<4> >
0128 {
0129 template< typename F, typename Tag, typename Protect > struct result_
0130 {
0131 typedef lambda< typename F::arg1, Tag, false_ > l1;
0132 typedef lambda< typename F::arg2, Tag, false_ > l2;
0133 typedef lambda< typename F::arg3, Tag, false_ > l3;
0134 typedef lambda< typename F::arg4, Tag, false_ > l4;
0135
0136 typedef typename l1::is_le is_le1;
0137 typedef typename l2::is_le is_le2;
0138 typedef typename l3::is_le is_le3;
0139 typedef typename l4::is_le is_le4;
0140
0141
0142 typedef aux::lambda_or<
0143 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
0144 > is_le;
0145
0146 typedef bind4<
0147 typename F::rebind
0148 , typename l1::type, typename l2::type, typename l3::type
0149 , typename l4::type
0150 > bind_;
0151
0152 typedef typename if_<
0153 is_le
0154 , if_< Protect, mpl::protect<bind_>, bind_ >
0155 , identity<F>
0156 >::type type_;
0157
0158 typedef typename type_::type type;
0159 };
0160 };
0161
0162 template<> struct lambda_impl< int_<5> >
0163 {
0164 template< typename F, typename Tag, typename Protect > struct result_
0165 {
0166 typedef lambda< typename F::arg1, Tag, false_ > l1;
0167 typedef lambda< typename F::arg2, Tag, false_ > l2;
0168 typedef lambda< typename F::arg3, Tag, false_ > l3;
0169 typedef lambda< typename F::arg4, Tag, false_ > l4;
0170 typedef lambda< typename F::arg5, Tag, false_ > l5;
0171
0172 typedef typename l1::is_le is_le1;
0173 typedef typename l2::is_le is_le2;
0174 typedef typename l3::is_le is_le3;
0175 typedef typename l4::is_le is_le4;
0176 typedef typename l5::is_le is_le5;
0177
0178
0179 typedef aux::lambda_or<
0180 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
0181 > is_le;
0182
0183 typedef bind5<
0184 typename F::rebind
0185 , typename l1::type, typename l2::type, typename l3::type
0186 , typename l4::type, typename l5::type
0187 > bind_;
0188
0189 typedef typename if_<
0190 is_le
0191 , if_< Protect, mpl::protect<bind_>, bind_ >
0192 , identity<F>
0193 >::type type_;
0194
0195 typedef typename type_::type type;
0196 };
0197 };
0198
0199 }
0200
0201 template<
0202 typename T
0203 , typename Tag
0204 , typename Protect
0205 >
0206 struct lambda
0207 {
0208
0209 typedef typename aux::template_arity<T>::type arity_;
0210 typedef typename aux::lambda_impl<arity_>
0211 ::template result_< T,Tag,Protect > l_;
0212
0213 typedef typename l_::type type;
0214 typedef typename l_::is_le is_le;
0215 BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect))
0216 };
0217
0218 BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda)
0219
0220 template<
0221 typename T
0222 >
0223 struct is_lambda_expression
0224 : lambda<T>::is_le
0225 {
0226 };
0227
0228 }}
0229