Chris@16: Chris@16: // Copyright Peter Dimov 2001 Chris@16: // Copyright Aleksey Gurtovoy 2001-2004 Chris@16: // Chris@16: // Distributed under the Boost Software License, Version 1.0. Chris@16: // (See accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: // Chris@16: Chris@16: // Preprocessed version of "boost/mpl/bind.hpp" header Chris@16: // -- DO NOT modify by hand! Chris@16: Chris@16: namespace boost { namespace mpl { Chris@16: Chris@16: namespace aux { Chris@16: Chris@16: template< Chris@16: typename T, typename U1, typename U2, typename U3, typename U4 Chris@16: , typename U5 Chris@16: > Chris@16: struct resolve_bind_arg Chris@16: { Chris@16: typedef T type; Chris@16: }; Chris@16: Chris@16: template< Chris@16: typename T Chris@16: , typename Arg Chris@16: > Chris@16: struct replace_unnamed_arg Chris@16: { Chris@16: typedef Arg next; Chris@16: typedef T type; Chris@16: }; Chris@16: Chris@16: template< Chris@16: typename Arg Chris@16: > Chris@16: struct replace_unnamed_arg< arg< -1 >, Arg > Chris@16: { Chris@16: typedef typename Arg::next next; Chris@16: typedef Arg type; Chris@16: }; Chris@16: Chris@16: template< Chris@16: int N, typename U1, typename U2, typename U3, typename U4, typename U5 Chris@16: > Chris@16: struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > Chris@16: { Chris@16: typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; Chris@16: }; Chris@16: Chris@16: template< Chris@16: typename F, typename T1, typename T2, typename T3, typename T4 Chris@16: , typename T5, typename U1, typename U2, typename U3, typename U4 Chris@16: , typename U5 Chris@16: > Chris@16: struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > Chris@16: { Chris@16: typedef bind< F,T1,T2,T3,T4,T5 > f_; Chris@16: typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; Chris@16: }; Chris@16: Chris@16: } // namespace aux Chris@16: Chris@16: template< Chris@16: typename F Chris@16: > Chris@16: struct bind0 Chris@16: { Chris@16: template< Chris@16: typename U1 = na, typename U2 = na, typename U3 = na Chris@16: , typename U4 = na, typename U5 = na Chris@16: > Chris@16: struct apply Chris@16: { Chris@16: private: Chris@16: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; Chris@16: typedef typename r0::type a0; Chris@16: typedef typename r0::next n1; Chris@16: typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; Chris@16: /// Chris@16: public: Chris@16: typedef typename apply_wrap0< Chris@16: f_ Chris@16: >::type type; Chris@16: Chris@16: }; Chris@16: }; Chris@16: Chris@16: namespace aux { Chris@16: Chris@16: template< Chris@16: typename F, typename U1, typename U2, typename U3, typename U4 Chris@16: , typename U5 Chris@16: > Chris@16: struct resolve_bind_arg< Chris@16: bind0, U1, U2, U3, U4, U5 Chris@16: > Chris@16: { Chris@16: typedef bind0 f_; Chris@16: typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; Chris@16: }; Chris@16: Chris@16: } // namespace aux Chris@16: Chris@16: BOOST_MPL_AUX_ARITY_SPEC(1, bind0) Chris@16: BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) Chris@16: Chris@16: template< Chris@16: typename F Chris@16: > Chris@16: struct bind< F,na,na,na,na,na > Chris@16: : bind0 Chris@16: { Chris@16: }; Chris@16: Chris@16: template< Chris@16: typename F, typename T1 Chris@16: > Chris@16: struct bind1 Chris@16: { Chris@16: template< Chris@16: typename U1 = na, typename U2 = na, typename U3 = na Chris@16: , typename U4 = na, typename U5 = na Chris@16: > Chris@16: struct apply Chris@16: { Chris@16: private: Chris@16: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; Chris@16: typedef typename r0::type a0; Chris@16: typedef typename r0::next n1; Chris@16: typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; Chris@16: /// Chris@16: typedef aux::replace_unnamed_arg< T1,n1 > r1; Chris@16: typedef typename r1::type a1; Chris@16: typedef typename r1::next n2; Chris@16: typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; Chris@16: /// Chris@16: public: Chris@16: typedef typename apply_wrap1< Chris@16: f_ Chris@16: , typename t1::type Chris@16: >::type type; Chris@16: Chris@16: }; Chris@16: }; Chris@16: Chris@16: namespace aux { Chris@16: Chris@16: template< Chris@16: typename F, typename T1, typename U1, typename U2, typename U3 Chris@16: , typename U4, typename U5 Chris@16: > Chris@16: struct resolve_bind_arg< Chris@16: bind1< F,T1 >, U1, U2, U3, U4, U5 Chris@16: > Chris@16: { Chris@16: typedef bind1< F,T1 > f_; Chris@16: typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; Chris@16: }; Chris@16: Chris@16: } // namespace aux Chris@16: Chris@16: BOOST_MPL_AUX_ARITY_SPEC(2, bind1) Chris@16: BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) Chris@16: Chris@16: template< Chris@16: typename F, typename T1 Chris@16: > Chris@16: struct bind< F,T1,na,na,na,na > Chris@16: : bind1< F,T1 > Chris@16: { Chris@16: }; Chris@16: Chris@16: template< Chris@16: typename F, typename T1, typename T2 Chris@16: > Chris@16: struct bind2 Chris@16: { Chris@16: template< Chris@16: typename U1 = na, typename U2 = na, typename U3 = na Chris@16: , typename U4 = na, typename U5 = na Chris@16: > Chris@16: struct apply Chris@16: { Chris@16: private: Chris@16: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; Chris@16: typedef typename r0::type a0; Chris@16: typedef typename r0::next n1; Chris@16: typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; Chris@16: /// Chris@16: typedef aux::replace_unnamed_arg< T1,n1 > r1; Chris@16: typedef typename r1::type a1; Chris@16: typedef typename r1::next n2; Chris@16: typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; Chris@16: /// Chris@16: typedef aux::replace_unnamed_arg< T2,n2 > r2; Chris@16: typedef typename r2::type a2; Chris@16: typedef typename r2::next n3; Chris@16: typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; Chris@16: /// Chris@16: public: Chris@16: typedef typename apply_wrap2< Chris@16: f_ Chris@16: , typename t1::type, typename t2::type Chris@16: >::type type; Chris@16: Chris@16: }; Chris@16: }; Chris@16: Chris@16: namespace aux { Chris@16: Chris@16: template< Chris@16: typename F, typename T1, typename T2, typename U1, typename U2 Chris@16: , typename U3, typename U4, typename U5 Chris@16: > Chris@16: struct resolve_bind_arg< Chris@16: bind2< F,T1,T2 >, U1, U2, U3, U4, U5 Chris@16: > Chris@16: { Chris@16: typedef bind2< F,T1,T2 > f_; Chris@16: typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; Chris@16: }; Chris@16: Chris@16: } // namespace aux Chris@16: Chris@16: BOOST_MPL_AUX_ARITY_SPEC(3, bind2) Chris@16: BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) Chris@16: Chris@16: template< Chris@16: typename F, typename T1, typename T2 Chris@16: > Chris@16: struct bind< F,T1,T2,na,na,na > Chris@16: : bind2< F,T1,T2 > Chris@16: { Chris@16: }; Chris@16: Chris@16: template< Chris@16: typename F, typename T1, typename T2, typename T3 Chris@16: > Chris@16: struct bind3 Chris@16: { Chris@16: template< Chris@16: typename U1 = na, typename U2 = na, typename U3 = na Chris@16: , typename U4 = na, typename U5 = na Chris@16: > Chris@16: struct apply Chris@16: { Chris@16: private: Chris@16: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; Chris@16: typedef typename r0::type a0; Chris@16: typedef typename r0::next n1; Chris@16: typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; Chris@16: /// Chris@16: typedef aux::replace_unnamed_arg< T1,n1 > r1; Chris@16: typedef typename r1::type a1; Chris@16: typedef typename r1::next n2; Chris@16: typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; Chris@16: /// Chris@16: typedef aux::replace_unnamed_arg< T2,n2 > r2; Chris@16: typedef typename r2::type a2; Chris@16: typedef typename r2::next n3; Chris@16: typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; Chris@16: /// Chris@16: typedef aux::replace_unnamed_arg< T3,n3 > r3; Chris@16: typedef typename r3::type a3; Chris@16: typedef typename r3::next n4; Chris@16: typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; Chris@16: /// Chris@16: public: Chris@16: typedef typename apply_wrap3< Chris@16: f_ Chris@16: , typename t1::type, typename t2::type, typename t3::type Chris@16: >::type type; Chris@16: Chris@16: }; Chris@16: }; Chris@16: Chris@16: namespace aux { Chris@16: Chris@16: template< Chris@16: typename F, typename T1, typename T2, typename T3, typename U1 Chris@16: , typename U2, typename U3, typename U4, typename U5 Chris@16: > Chris@16: struct resolve_bind_arg< Chris@16: bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 Chris@16: > Chris@16: { Chris@16: typedef bind3< F,T1,T2,T3 > f_; Chris@16: typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; Chris@16: }; Chris@16: Chris@16: } // namespace aux Chris@16: Chris@16: BOOST_MPL_AUX_ARITY_SPEC(4, bind3) Chris@16: BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) Chris@16: Chris@16: template< Chris@16: typename F, typename T1, typename T2, typename T3 Chris@16: > Chris@16: struct bind< F,T1,T2,T3,na,na > Chris@16: : bind3< F,T1,T2,T3 > Chris@16: { Chris@16: }; Chris@16: Chris@16: template< Chris@16: typename F, typename T1, typename T2, typename T3, typename T4 Chris@16: > Chris@16: struct bind4 Chris@16: { Chris@16: template< Chris@16: typename U1 = na, typename U2 = na, typename U3 = na Chris@16: , typename U4 = na, typename U5 = na Chris@16: > Chris@16: struct apply Chris@16: { Chris@16: private: Chris@16: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; Chris@16: typedef typename r0::type a0; Chris@16: typedef typename r0::next n1; Chris@16: typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; Chris@16: /// Chris@16: typedef aux::replace_unnamed_arg< T1,n1 > r1; Chris@16: typedef typename r1::type a1; Chris@16: typedef typename r1::next n2; Chris@16: typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; Chris@16: /// Chris@16: typedef aux::replace_unnamed_arg< T2,n2 > r2; Chris@16: typedef typename r2::type a2; Chris@16: typedef typename r2::next n3; Chris@16: typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; Chris@16: /// Chris@16: typedef aux::replace_unnamed_arg< T3,n3 > r3; Chris@16: typedef typename r3::type a3; Chris@16: typedef typename r3::next n4; Chris@16: typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; Chris@16: /// Chris@16: typedef aux::replace_unnamed_arg< T4,n4 > r4; Chris@16: typedef typename r4::type a4; Chris@16: typedef typename r4::next n5; Chris@16: typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; Chris@16: /// Chris@16: public: Chris@16: typedef typename apply_wrap4< Chris@16: f_ Chris@16: , typename t1::type, typename t2::type, typename t3::type Chris@16: , typename t4::type Chris@16: >::type type; Chris@16: Chris@16: }; Chris@16: }; Chris@16: Chris@16: namespace aux { Chris@16: Chris@16: template< Chris@16: typename F, typename T1, typename T2, typename T3, typename T4 Chris@16: , typename U1, typename U2, typename U3, typename U4, typename U5 Chris@16: > Chris@16: struct resolve_bind_arg< Chris@16: bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 Chris@16: > Chris@16: { Chris@16: typedef bind4< F,T1,T2,T3,T4 > f_; Chris@16: typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; Chris@16: }; Chris@16: Chris@16: } // namespace aux Chris@16: Chris@16: BOOST_MPL_AUX_ARITY_SPEC(5, bind4) Chris@16: BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) Chris@16: Chris@16: template< Chris@16: typename F, typename T1, typename T2, typename T3, typename T4 Chris@16: > Chris@16: struct bind< F,T1,T2,T3,T4,na > Chris@16: : bind4< F,T1,T2,T3,T4 > Chris@16: { Chris@16: }; Chris@16: Chris@16: template< Chris@16: typename F, typename T1, typename T2, typename T3, typename T4 Chris@16: , typename T5 Chris@16: > Chris@16: struct bind5 Chris@16: { Chris@16: template< Chris@16: typename U1 = na, typename U2 = na, typename U3 = na Chris@16: , typename U4 = na, typename U5 = na Chris@16: > Chris@16: struct apply Chris@16: { Chris@16: private: Chris@16: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; Chris@16: typedef typename r0::type a0; Chris@16: typedef typename r0::next n1; Chris@16: typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; Chris@16: /// Chris@16: typedef aux::replace_unnamed_arg< T1,n1 > r1; Chris@16: typedef typename r1::type a1; Chris@16: typedef typename r1::next n2; Chris@16: typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; Chris@16: /// Chris@16: typedef aux::replace_unnamed_arg< T2,n2 > r2; Chris@16: typedef typename r2::type a2; Chris@16: typedef typename r2::next n3; Chris@16: typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; Chris@16: /// Chris@16: typedef aux::replace_unnamed_arg< T3,n3 > r3; Chris@16: typedef typename r3::type a3; Chris@16: typedef typename r3::next n4; Chris@16: typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; Chris@16: /// Chris@16: typedef aux::replace_unnamed_arg< T4,n4 > r4; Chris@16: typedef typename r4::type a4; Chris@16: typedef typename r4::next n5; Chris@16: typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; Chris@16: /// Chris@16: typedef aux::replace_unnamed_arg< T5,n5 > r5; Chris@16: typedef typename r5::type a5; Chris@16: typedef typename r5::next n6; Chris@16: typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; Chris@16: /// Chris@16: public: Chris@16: typedef typename apply_wrap5< Chris@16: f_ Chris@16: , typename t1::type, typename t2::type, typename t3::type Chris@16: , typename t4::type, typename t5::type Chris@16: >::type type; Chris@16: Chris@16: }; Chris@16: }; Chris@16: Chris@16: namespace aux { Chris@16: Chris@16: template< Chris@16: typename F, typename T1, typename T2, typename T3, typename T4 Chris@16: , typename T5, typename U1, typename U2, typename U3, typename U4 Chris@16: , typename U5 Chris@16: > Chris@16: struct resolve_bind_arg< Chris@16: bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 Chris@16: > Chris@16: { Chris@16: typedef bind5< F,T1,T2,T3,T4,T5 > f_; Chris@16: typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; Chris@16: }; Chris@16: Chris@16: } // namespace aux Chris@16: Chris@16: BOOST_MPL_AUX_ARITY_SPEC(6, bind5) Chris@16: BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) Chris@16: Chris@16: /// primary template (not a specialization!) Chris@16: Chris@16: template< Chris@16: typename F, typename T1, typename T2, typename T3, typename T4 Chris@16: , typename T5 Chris@16: > Chris@16: struct bind Chris@16: : bind5< F,T1,T2,T3,T4,T5 > Chris@16: { Chris@16: }; Chris@16: Chris@16: /// if_/eval_if specializations Chris@16: template< template< typename T1, typename T2, typename T3 > class F, typename Tag > Chris@16: struct quote3; Chris@16: Chris@16: template< typename T1, typename T2, typename T3 > struct if_; Chris@16: Chris@16: template< Chris@16: typename Tag, typename T1, typename T2, typename T3 Chris@16: > Chris@16: struct bind3< Chris@16: quote3< if_,Tag > Chris@16: , T1, T2, T3 Chris@16: > Chris@16: { Chris@16: template< Chris@16: typename U1 = na, typename U2 = na, typename U3 = na Chris@16: , typename U4 = na, typename U5 = na Chris@16: > Chris@16: struct apply Chris@16: { Chris@16: private: Chris@16: typedef mpl::arg<1> n1; Chris@16: typedef aux::replace_unnamed_arg< T1,n1 > r1; Chris@16: typedef typename r1::type a1; Chris@16: typedef typename r1::next n2; Chris@16: typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; Chris@16: /// Chris@16: typedef aux::replace_unnamed_arg< T2,n2 > r2; Chris@16: typedef typename r2::type a2; Chris@16: typedef typename r2::next n3; Chris@16: typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; Chris@16: /// Chris@16: typedef aux::replace_unnamed_arg< T3,n3 > r3; Chris@16: typedef typename r3::type a3; Chris@16: typedef typename r3::next n4; Chris@16: typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; Chris@16: /// Chris@16: typedef typename if_< Chris@16: typename t1::type Chris@16: , t2, t3 Chris@16: >::type f_; Chris@16: Chris@16: public: Chris@16: typedef typename f_::type type; Chris@16: }; Chris@16: }; Chris@16: Chris@16: template< Chris@16: template< typename T1, typename T2, typename T3 > class F, typename Tag Chris@16: > Chris@16: struct quote3; Chris@16: Chris@16: template< typename T1, typename T2, typename T3 > struct eval_if; Chris@16: Chris@16: template< Chris@16: typename Tag, typename T1, typename T2, typename T3 Chris@16: > Chris@16: struct bind3< Chris@16: quote3< eval_if,Tag > Chris@16: , T1, T2, T3 Chris@16: > Chris@16: { Chris@16: template< Chris@16: typename U1 = na, typename U2 = na, typename U3 = na Chris@16: , typename U4 = na, typename U5 = na Chris@16: > Chris@16: struct apply Chris@16: { Chris@16: private: Chris@16: typedef mpl::arg<1> n1; Chris@16: typedef aux::replace_unnamed_arg< T1,n1 > r1; Chris@16: typedef typename r1::type a1; Chris@16: typedef typename r1::next n2; Chris@16: typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; Chris@16: /// Chris@16: typedef aux::replace_unnamed_arg< T2,n2 > r2; Chris@16: typedef typename r2::type a2; Chris@16: typedef typename r2::next n3; Chris@16: typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; Chris@16: /// Chris@16: typedef aux::replace_unnamed_arg< T3,n3 > r3; Chris@16: typedef typename r3::type a3; Chris@16: typedef typename r3::next n4; Chris@16: typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; Chris@16: /// Chris@16: typedef typename eval_if< Chris@16: typename t1::type Chris@16: , t2, t3 Chris@16: >::type f_; Chris@16: Chris@16: public: Chris@16: typedef typename f_::type type; Chris@16: }; Chris@16: }; Chris@16: Chris@16: }} Chris@16: