File indexing completed on 2025-01-18 09:41:17
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 namespace boost { namespace mpl {
0014
0015 namespace aux {
0016 template< bool >
0017 struct resolve_arg_impl
0018 {
0019 template<
0020 typename T, typename U1, typename U2, typename U3
0021 , typename U4, typename U5
0022 >
0023 struct result_
0024 {
0025 typedef T type;
0026 };
0027 };
0028
0029 template<>
0030 struct resolve_arg_impl<true>
0031 {
0032 template<
0033 typename T, typename U1, typename U2, typename U3
0034 , typename U4, typename U5
0035 >
0036 struct result_
0037 {
0038 typedef typename apply_wrap5<
0039 T
0040 , U1, U2, U3, U4, U5
0041 >::type type;
0042 };
0043 };
0044
0045 template< typename T > struct is_bind_template;
0046
0047 template<
0048 typename T, typename U1, typename U2, typename U3, typename U4
0049 , typename U5
0050 >
0051 struct resolve_bind_arg
0052 : resolve_arg_impl< is_bind_template<T>::value >
0053 ::template result_< T,U1,U2,U3,U4,U5 >
0054 {
0055 };
0056
0057 template< int arity_ > struct bind_chooser;
0058
0059 aux::no_tag is_bind_helper(...);
0060 template< typename T > aux::no_tag is_bind_helper(protect<T>*);
0061
0062 template< int N >
0063 aux::yes_tag is_bind_helper(arg<N>*);
0064
0065 template< bool is_ref_ = true >
0066 struct is_bind_template_impl
0067 {
0068 template< typename T > struct result_
0069 {
0070 BOOST_STATIC_CONSTANT(bool, value = false);
0071 };
0072 };
0073
0074 template<>
0075 struct is_bind_template_impl<false>
0076 {
0077 template< typename T > struct result_
0078 {
0079 BOOST_STATIC_CONSTANT(bool, value =
0080 sizeof(aux::is_bind_helper(static_cast<T*>(0)))
0081 == sizeof(aux::yes_tag)
0082 );
0083 };
0084 };
0085
0086 template< typename T > struct is_bind_template
0087 : is_bind_template_impl< ::boost::detail::is_reference_impl<T>::value >
0088 ::template result_<T>
0089 {
0090 };
0091
0092 }
0093
0094 template<
0095 typename F
0096 >
0097 struct bind0
0098 {
0099 template<
0100 typename U1 = na, typename U2 = na, typename U3 = na
0101 , typename U4 = na, typename U5 = na
0102 >
0103 struct apply
0104 {
0105 private:
0106 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
0107
0108 public:
0109 typedef typename apply_wrap0<
0110 f_
0111 >::type type;
0112
0113 };
0114 };
0115
0116 namespace aux {
0117
0118 template<
0119 typename F
0120 >
0121 aux::yes_tag
0122 is_bind_helper(bind0<F>*);
0123
0124 }
0125
0126 BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
0127 BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
0128
0129 template<
0130 typename F, typename T1
0131 >
0132 struct bind1
0133 {
0134 template<
0135 typename U1 = na, typename U2 = na, typename U3 = na
0136 , typename U4 = na, typename U5 = na
0137 >
0138 struct apply
0139 {
0140 private:
0141 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
0142 typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
0143
0144 public:
0145 typedef typename apply_wrap1<
0146 f_
0147 , typename t1::type
0148 >::type type;
0149
0150 };
0151 };
0152
0153 namespace aux {
0154
0155 template<
0156 typename F, typename T1
0157 >
0158 aux::yes_tag
0159 is_bind_helper(bind1< F,T1 >*);
0160
0161 }
0162
0163 BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
0164 BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
0165
0166 template<
0167 typename F, typename T1, typename T2
0168 >
0169 struct bind2
0170 {
0171 template<
0172 typename U1 = na, typename U2 = na, typename U3 = na
0173 , typename U4 = na, typename U5 = na
0174 >
0175 struct apply
0176 {
0177 private:
0178 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
0179 typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
0180 typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
0181
0182 public:
0183 typedef typename apply_wrap2<
0184 f_
0185 , typename t1::type, typename t2::type
0186 >::type type;
0187
0188 };
0189 };
0190
0191 namespace aux {
0192
0193 template<
0194 typename F, typename T1, typename T2
0195 >
0196 aux::yes_tag
0197 is_bind_helper(bind2< F,T1,T2 >*);
0198
0199 }
0200
0201 BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
0202 BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
0203
0204 template<
0205 typename F, typename T1, typename T2, typename T3
0206 >
0207 struct bind3
0208 {
0209 template<
0210 typename U1 = na, typename U2 = na, typename U3 = na
0211 , typename U4 = na, typename U5 = na
0212 >
0213 struct apply
0214 {
0215 private:
0216 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
0217 typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
0218 typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
0219 typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
0220
0221 public:
0222 typedef typename apply_wrap3<
0223 f_
0224 , typename t1::type, typename t2::type, typename t3::type
0225 >::type type;
0226
0227 };
0228 };
0229
0230 namespace aux {
0231
0232 template<
0233 typename F, typename T1, typename T2, typename T3
0234 >
0235 aux::yes_tag
0236 is_bind_helper(bind3< F,T1,T2,T3 >*);
0237
0238 }
0239
0240 BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
0241 BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
0242
0243 template<
0244 typename F, typename T1, typename T2, typename T3, typename T4
0245 >
0246 struct bind4
0247 {
0248 template<
0249 typename U1 = na, typename U2 = na, typename U3 = na
0250 , typename U4 = na, typename U5 = na
0251 >
0252 struct apply
0253 {
0254 private:
0255 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
0256 typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
0257 typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
0258 typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
0259 typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
0260
0261 public:
0262 typedef typename apply_wrap4<
0263 f_
0264 , typename t1::type, typename t2::type, typename t3::type
0265 , typename t4::type
0266 >::type type;
0267
0268 };
0269 };
0270
0271 namespace aux {
0272
0273 template<
0274 typename F, typename T1, typename T2, typename T3, typename T4
0275 >
0276 aux::yes_tag
0277 is_bind_helper(bind4< F,T1,T2,T3,T4 >*);
0278
0279 }
0280
0281 BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
0282 BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
0283
0284 template<
0285 typename F, typename T1, typename T2, typename T3, typename T4
0286 , typename T5
0287 >
0288 struct bind5
0289 {
0290 template<
0291 typename U1 = na, typename U2 = na, typename U3 = na
0292 , typename U4 = na, typename U5 = na
0293 >
0294 struct apply
0295 {
0296 private:
0297 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
0298 typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
0299 typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
0300 typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
0301 typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
0302 typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5;
0303
0304 public:
0305 typedef typename apply_wrap5<
0306 f_
0307 , typename t1::type, typename t2::type, typename t3::type
0308 , typename t4::type, typename t5::type
0309 >::type type;
0310
0311 };
0312 };
0313
0314 namespace aux {
0315
0316 template<
0317 typename F, typename T1, typename T2, typename T3, typename T4
0318 , typename T5
0319 >
0320 aux::yes_tag
0321 is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*);
0322
0323 }
0324
0325 BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
0326 BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
0327 }}
0328