Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:41:27

0001 
0002 // Copyright Peter Dimov 2001
0003 // Copyright Aleksey Gurtovoy 2001-2004
0004 //
0005 // Distributed under the Boost Software License, Version 1.0. 
0006 // (See accompanying file LICENSE_1_0.txt or copy at 
0007 // http://www.boost.org/LICENSE_1_0.txt)
0008 //
0009 
0010 // Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header
0011 // -- DO NOT modify by hand!
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<
0063       typename F, typename T1, typename T2, typename T3, typename T4
0064     , typename T5
0065     >
0066 aux::yes_tag is_bind_helper(bind< F,T1,T2,T3,T4,T5 >*);
0067 
0068 template< int N >
0069 aux::yes_tag is_bind_helper(arg<N>*);
0070 
0071 template< bool is_ref_  = true >
0072 struct is_bind_template_impl
0073 {
0074     template< typename T > struct result_
0075     {
0076         BOOST_STATIC_CONSTANT(bool, value  = false);
0077     };
0078 };
0079 
0080 template<>
0081 struct is_bind_template_impl<false>
0082 {
0083     template< typename T > struct result_
0084     {
0085         BOOST_STATIC_CONSTANT(bool, value =
0086               sizeof(aux::is_bind_helper(static_cast<T*>(0)))
0087                 == sizeof(aux::yes_tag)
0088             );
0089     };
0090 };
0091 
0092 template< typename T > struct is_bind_template
0093     : is_bind_template_impl< ::boost::detail::is_reference_impl<T>::value >
0094         ::template result_<T>
0095 {
0096 };
0097 
0098 } // namespace aux
0099 
0100 template<
0101       typename F
0102     >
0103 struct bind0
0104 {
0105     template<
0106           typename U1 = na, typename U2 = na, typename U3 = na
0107         , typename U4 = na, typename U5 = na
0108         >
0109     struct apply
0110     {
0111      private:
0112         typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
0113 
0114      public:
0115         typedef typename apply_wrap0<
0116               f_
0117             >::type type;
0118 
0119     };
0120 };
0121 
0122 namespace aux {
0123 
0124 template<
0125       typename F
0126     >
0127 aux::yes_tag
0128 is_bind_helper(bind0<F>*);
0129 
0130 } // namespace aux
0131 
0132 BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
0133 BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
0134 
0135 namespace aux {
0136 
0137 template<>
0138 struct bind_chooser<0>
0139 {
0140     template<
0141           typename F, typename T1, typename T2, typename T3, typename T4
0142         , typename T5
0143         >
0144     struct result_
0145     {
0146         typedef bind0<F> type;
0147     };
0148 };
0149 
0150 } // namespace aux
0151 
0152 template<
0153       typename F, typename T1
0154     >
0155 struct bind1
0156 {
0157     template<
0158           typename U1 = na, typename U2 = na, typename U3 = na
0159         , typename U4 = na, typename U5 = na
0160         >
0161     struct apply
0162     {
0163      private:
0164         typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
0165         typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
0166 
0167      public:
0168         typedef typename apply_wrap1<
0169               f_
0170             , typename t1::type
0171             >::type type;
0172 
0173     };
0174 };
0175 
0176 namespace aux {
0177 
0178 template<
0179       typename F, typename T1
0180     >
0181 aux::yes_tag
0182 is_bind_helper(bind1< F,T1 >*);
0183 
0184 } // namespace aux
0185 
0186 BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
0187 BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
0188 
0189 namespace aux {
0190 
0191 template<>
0192 struct bind_chooser<1>
0193 {
0194     template<
0195           typename F, typename T1, typename T2, typename T3, typename T4
0196         , typename T5
0197         >
0198     struct result_
0199     {
0200         typedef bind1< F,T1 > type;
0201     };
0202 };
0203 
0204 } // namespace aux
0205 
0206 template<
0207       typename F, typename T1, typename T2
0208     >
0209 struct bind2
0210 {
0211     template<
0212           typename U1 = na, typename U2 = na, typename U3 = na
0213         , typename U4 = na, typename U5 = na
0214         >
0215     struct apply
0216     {
0217      private:
0218         typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
0219         typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
0220         typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
0221 
0222      public:
0223         typedef typename apply_wrap2<
0224               f_
0225             , typename t1::type, typename t2::type
0226             >::type type;
0227 
0228     };
0229 };
0230 
0231 namespace aux {
0232 
0233 template<
0234       typename F, typename T1, typename T2
0235     >
0236 aux::yes_tag
0237 is_bind_helper(bind2< F,T1,T2 >*);
0238 
0239 } // namespace aux
0240 
0241 BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
0242 BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
0243 
0244 namespace aux {
0245 
0246 template<>
0247 struct bind_chooser<2>
0248 {
0249     template<
0250           typename F, typename T1, typename T2, typename T3, typename T4
0251         , typename T5
0252         >
0253     struct result_
0254     {
0255         typedef bind2< F,T1,T2 > type;
0256     };
0257 };
0258 
0259 } // namespace aux
0260 
0261 template<
0262       typename F, typename T1, typename T2, typename T3
0263     >
0264 struct bind3
0265 {
0266     template<
0267           typename U1 = na, typename U2 = na, typename U3 = na
0268         , typename U4 = na, typename U5 = na
0269         >
0270     struct apply
0271     {
0272      private:
0273         typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
0274         typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
0275         typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
0276         typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
0277 
0278      public:
0279         typedef typename apply_wrap3<
0280               f_
0281             , typename t1::type, typename t2::type, typename t3::type
0282             >::type type;
0283 
0284     };
0285 };
0286 
0287 namespace aux {
0288 
0289 template<
0290       typename F, typename T1, typename T2, typename T3
0291     >
0292 aux::yes_tag
0293 is_bind_helper(bind3< F,T1,T2,T3 >*);
0294 
0295 } // namespace aux
0296 
0297 BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
0298 BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
0299 
0300 namespace aux {
0301 
0302 template<>
0303 struct bind_chooser<3>
0304 {
0305     template<
0306           typename F, typename T1, typename T2, typename T3, typename T4
0307         , typename T5
0308         >
0309     struct result_
0310     {
0311         typedef bind3< F,T1,T2,T3 > type;
0312     };
0313 };
0314 
0315 } // namespace aux
0316 
0317 template<
0318       typename F, typename T1, typename T2, typename T3, typename T4
0319     >
0320 struct bind4
0321 {
0322     template<
0323           typename U1 = na, typename U2 = na, typename U3 = na
0324         , typename U4 = na, typename U5 = na
0325         >
0326     struct apply
0327     {
0328      private:
0329         typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
0330         typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
0331         typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
0332         typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
0333         typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
0334 
0335      public:
0336         typedef typename apply_wrap4<
0337               f_
0338             , typename t1::type, typename t2::type, typename t3::type
0339             , typename t4::type
0340             >::type type;
0341 
0342     };
0343 };
0344 
0345 namespace aux {
0346 
0347 template<
0348       typename F, typename T1, typename T2, typename T3, typename T4
0349     >
0350 aux::yes_tag
0351 is_bind_helper(bind4< F,T1,T2,T3,T4 >*);
0352 
0353 } // namespace aux
0354 
0355 BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
0356 BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
0357 
0358 namespace aux {
0359 
0360 template<>
0361 struct bind_chooser<4>
0362 {
0363     template<
0364           typename F, typename T1, typename T2, typename T3, typename T4
0365         , typename T5
0366         >
0367     struct result_
0368     {
0369         typedef bind4< F,T1,T2,T3,T4 > type;
0370     };
0371 };
0372 
0373 } // namespace aux
0374 
0375 template<
0376       typename F, typename T1, typename T2, typename T3, typename T4
0377     , typename T5
0378     >
0379 struct bind5
0380 {
0381     template<
0382           typename U1 = na, typename U2 = na, typename U3 = na
0383         , typename U4 = na, typename U5 = na
0384         >
0385     struct apply
0386     {
0387      private:
0388         typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_;
0389         typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1;
0390         typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2;
0391         typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3;
0392         typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4;
0393         typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5;
0394 
0395      public:
0396         typedef typename apply_wrap5<
0397               f_
0398             , typename t1::type, typename t2::type, typename t3::type
0399             , typename t4::type, typename t5::type
0400             >::type type;
0401 
0402     };
0403 };
0404 
0405 namespace aux {
0406 
0407 template<
0408       typename F, typename T1, typename T2, typename T3, typename T4
0409     , typename T5
0410     >
0411 aux::yes_tag
0412 is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*);
0413 
0414 } // namespace aux
0415 
0416 BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
0417 BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
0418 
0419 namespace aux {
0420 
0421 template<>
0422 struct bind_chooser<5>
0423 {
0424     template<
0425           typename F, typename T1, typename T2, typename T3, typename T4
0426         , typename T5
0427         >
0428     struct result_
0429     {
0430         typedef bind5< F,T1,T2,T3,T4,T5 > type;
0431     };
0432 };
0433 
0434 } // namespace aux
0435 
0436 namespace aux {
0437 
0438 template< typename T >
0439 struct is_bind_arg
0440 {
0441     BOOST_STATIC_CONSTANT(bool, value  = true);
0442 };
0443 
0444 template<>
0445 struct is_bind_arg<na>
0446 {
0447     BOOST_STATIC_CONSTANT(bool, value  = false);
0448 };
0449 
0450 template<
0451       typename T1, typename T2, typename T3, typename T4, typename T5
0452     >
0453 struct bind_count_args
0454 {
0455     BOOST_STATIC_CONSTANT(int, value =
0456           is_bind_arg<T1>::value + is_bind_arg<T2>::value 
0457         + is_bind_arg<T3>::value + is_bind_arg<T4>::value 
0458         + is_bind_arg<T5>::value
0459         );
0460 
0461 };
0462 
0463 }
0464 
0465 template<
0466       typename F, typename T1, typename T2, typename T3, typename T4
0467     , typename T5
0468     >
0469 struct bind
0470     : aux::bind_chooser<
0471           aux::bind_count_args< T1,T2,T3,T4,T5 >::value
0472         >::template result_< F,T1,T2,T3,T4,T5 >::type
0473 {
0474 };
0475 
0476 BOOST_MPL_AUX_ARITY_SPEC(
0477       6
0478     , bind
0479     )
0480 
0481 BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(
0482       6
0483     , bind
0484     )
0485 }}
0486