Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:50:24

0001     ///////////////////////////////////////////////////////////////////////////////
0002     /// \file make_expr_.hpp
0003     /// Contains definition of make_expr_\<\> class template.
0004     //
0005     //  Copyright 2008 Eric Niebler. Distributed under the Boost
0006     //  Software License, Version 1.0. (See accompanying file
0007     //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0008     template<
0009         typename Tag
0010       , typename Domain
0011         , typename A0 = void , typename A1 = void , typename A2 = void , typename A3 = void , typename A4 = void , typename A5 = void , typename A6 = void , typename A7 = void , typename A8 = void , typename A9 = void
0012       , typename _ = void
0013     >
0014     struct make_expr_
0015     {};
0016     template<typename Domain, typename A>
0017     struct make_expr_<tag::terminal, Domain, A
0018         , void , void , void , void , void , void , void , void , void , void>
0019     {
0020         typedef typename proto::detail::protoify<A, Domain>::result_type result_type;
0021         BOOST_FORCEINLINE
0022         result_type operator()(typename add_reference<A>::type a) const
0023         {
0024             return proto::detail::protoify<A, Domain>()(a);
0025         }
0026     };
0027     template<typename A>
0028     struct make_expr_<tag::terminal, deduce_domain, A
0029         , void , void , void , void , void , void , void , void , void , void>
0030       : make_expr_<tag::terminal, default_domain, A>
0031     {};
0032     template<typename Tag, typename Domain , typename A0>
0033     struct make_expr_<Tag, Domain , A0
0034         , void , void , void , void , void , void , void , void , void, void>
0035     {
0036         typedef
0037             list1<
0038                 typename boost::proto::detail::protoify< A0 , Domain >::result_type
0039             >
0040         proto_args;
0041         typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
0042         typedef typename Domain::proto_generator proto_generator;
0043         typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
0044         BOOST_FORCEINLINE
0045         result_type operator()(typename add_reference<A0 >::type a0) const
0046         {
0047             expr_type const that = {
0048                 boost::proto::detail::protoify< A0 , Domain >()(a0)
0049             };
0050             return proto_generator()(that);
0051         }
0052     };
0053     template<typename Tag , typename A0>
0054     struct make_expr_<Tag, deduce_domain , A0
0055         , void , void , void , void , void , void , void , void , void, void>
0056       : make_expr_<
0057             Tag
0058           , typename deduce_domain1<A0>::type
0059             , A0
0060         >
0061     {};
0062     template<typename Tag, typename Domain , typename A0 , typename A1>
0063     struct make_expr_<Tag, Domain , A0 , A1
0064         , void , void , void , void , void , void , void , void, void>
0065     {
0066         typedef
0067             list2<
0068                 typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type
0069             >
0070         proto_args;
0071         typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
0072         typedef typename Domain::proto_generator proto_generator;
0073         typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
0074         BOOST_FORCEINLINE
0075         result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1) const
0076         {
0077             expr_type const that = {
0078                 boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1)
0079             };
0080             return proto_generator()(that);
0081         }
0082     };
0083     template<typename Tag , typename A0 , typename A1>
0084     struct make_expr_<Tag, deduce_domain , A0 , A1
0085         , void , void , void , void , void , void , void , void, void>
0086       : make_expr_<
0087             Tag
0088           , typename deduce_domain2<A0 , A1>::type
0089             , A0 , A1
0090         >
0091     {};
0092     template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2>
0093     struct make_expr_<Tag, Domain , A0 , A1 , A2
0094         , void , void , void , void , void , void , void, void>
0095     {
0096         typedef
0097             list3<
0098                 typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type
0099             >
0100         proto_args;
0101         typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
0102         typedef typename Domain::proto_generator proto_generator;
0103         typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
0104         BOOST_FORCEINLINE
0105         result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2) const
0106         {
0107             expr_type const that = {
0108                 boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2)
0109             };
0110             return proto_generator()(that);
0111         }
0112     };
0113     template<typename Tag , typename A0 , typename A1 , typename A2>
0114     struct make_expr_<Tag, deduce_domain , A0 , A1 , A2
0115         , void , void , void , void , void , void , void, void>
0116       : make_expr_<
0117             Tag
0118           , typename deduce_domain3<A0 , A1 , A2>::type
0119             , A0 , A1 , A2
0120         >
0121     {};
0122     template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3>
0123     struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3
0124         , void , void , void , void , void , void, void>
0125     {
0126         typedef
0127             list4<
0128                 typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type
0129             >
0130         proto_args;
0131         typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
0132         typedef typename Domain::proto_generator proto_generator;
0133         typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
0134         BOOST_FORCEINLINE
0135         result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3) const
0136         {
0137             expr_type const that = {
0138                 boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3)
0139             };
0140             return proto_generator()(that);
0141         }
0142     };
0143     template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3>
0144     struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3
0145         , void , void , void , void , void , void, void>
0146       : make_expr_<
0147             Tag
0148           , typename deduce_domain4<A0 , A1 , A2 , A3>::type
0149             , A0 , A1 , A2 , A3
0150         >
0151     {};
0152     template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
0153     struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4
0154         , void , void , void , void , void, void>
0155     {
0156         typedef
0157             list5<
0158                 typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type
0159             >
0160         proto_args;
0161         typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
0162         typedef typename Domain::proto_generator proto_generator;
0163         typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
0164         BOOST_FORCEINLINE
0165         result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4) const
0166         {
0167             expr_type const that = {
0168                 boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4)
0169             };
0170             return proto_generator()(that);
0171         }
0172     };
0173     template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
0174     struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4
0175         , void , void , void , void , void, void>
0176       : make_expr_<
0177             Tag
0178           , typename deduce_domain5<A0 , A1 , A2 , A3 , A4>::type
0179             , A0 , A1 , A2 , A3 , A4
0180         >
0181     {};
0182     template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
0183     struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4 , A5
0184         , void , void , void , void, void>
0185     {
0186         typedef
0187             list6<
0188                 typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type , typename boost::proto::detail::protoify< A5 , Domain >::result_type
0189             >
0190         proto_args;
0191         typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
0192         typedef typename Domain::proto_generator proto_generator;
0193         typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
0194         BOOST_FORCEINLINE
0195         result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4 , typename add_reference<A5 >::type a5) const
0196         {
0197             expr_type const that = {
0198                 boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4) , boost::proto::detail::protoify< A5 , Domain >()(a5)
0199             };
0200             return proto_generator()(that);
0201         }
0202     };
0203     template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
0204     struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4 , A5
0205         , void , void , void , void, void>
0206       : make_expr_<
0207             Tag
0208           , typename deduce_domain6<A0 , A1 , A2 , A3 , A4 , A5>::type
0209             , A0 , A1 , A2 , A3 , A4 , A5
0210         >
0211     {};
0212     template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
0213     struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4 , A5 , A6
0214         , void , void , void, void>
0215     {
0216         typedef
0217             list7<
0218                 typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type , typename boost::proto::detail::protoify< A5 , Domain >::result_type , typename boost::proto::detail::protoify< A6 , Domain >::result_type
0219             >
0220         proto_args;
0221         typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
0222         typedef typename Domain::proto_generator proto_generator;
0223         typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
0224         BOOST_FORCEINLINE
0225         result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4 , typename add_reference<A5 >::type a5 , typename add_reference<A6 >::type a6) const
0226         {
0227             expr_type const that = {
0228                 boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4) , boost::proto::detail::protoify< A5 , Domain >()(a5) , boost::proto::detail::protoify< A6 , Domain >()(a6)
0229             };
0230             return proto_generator()(that);
0231         }
0232     };
0233     template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
0234     struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4 , A5 , A6
0235         , void , void , void, void>
0236       : make_expr_<
0237             Tag
0238           , typename deduce_domain7<A0 , A1 , A2 , A3 , A4 , A5 , A6>::type
0239             , A0 , A1 , A2 , A3 , A4 , A5 , A6
0240         >
0241     {};
0242     template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
0243     struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
0244         , void , void, void>
0245     {
0246         typedef
0247             list8<
0248                 typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type , typename boost::proto::detail::protoify< A5 , Domain >::result_type , typename boost::proto::detail::protoify< A6 , Domain >::result_type , typename boost::proto::detail::protoify< A7 , Domain >::result_type
0249             >
0250         proto_args;
0251         typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
0252         typedef typename Domain::proto_generator proto_generator;
0253         typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
0254         BOOST_FORCEINLINE
0255         result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4 , typename add_reference<A5 >::type a5 , typename add_reference<A6 >::type a6 , typename add_reference<A7 >::type a7) const
0256         {
0257             expr_type const that = {
0258                 boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4) , boost::proto::detail::protoify< A5 , Domain >()(a5) , boost::proto::detail::protoify< A6 , Domain >()(a6) , boost::proto::detail::protoify< A7 , Domain >()(a7)
0259             };
0260             return proto_generator()(that);
0261         }
0262     };
0263     template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
0264     struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
0265         , void , void, void>
0266       : make_expr_<
0267             Tag
0268           , typename deduce_domain8<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>::type
0269             , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
0270         >
0271     {};
0272     template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
0273     struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
0274         , void, void>
0275     {
0276         typedef
0277             list9<
0278                 typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type , typename boost::proto::detail::protoify< A5 , Domain >::result_type , typename boost::proto::detail::protoify< A6 , Domain >::result_type , typename boost::proto::detail::protoify< A7 , Domain >::result_type , typename boost::proto::detail::protoify< A8 , Domain >::result_type
0279             >
0280         proto_args;
0281         typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
0282         typedef typename Domain::proto_generator proto_generator;
0283         typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
0284         BOOST_FORCEINLINE
0285         result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4 , typename add_reference<A5 >::type a5 , typename add_reference<A6 >::type a6 , typename add_reference<A7 >::type a7 , typename add_reference<A8 >::type a8) const
0286         {
0287             expr_type const that = {
0288                 boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4) , boost::proto::detail::protoify< A5 , Domain >()(a5) , boost::proto::detail::protoify< A6 , Domain >()(a6) , boost::proto::detail::protoify< A7 , Domain >()(a7) , boost::proto::detail::protoify< A8 , Domain >()(a8)
0289             };
0290             return proto_generator()(that);
0291         }
0292     };
0293     template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
0294     struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
0295         , void, void>
0296       : make_expr_<
0297             Tag
0298           , typename deduce_domain9<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>::type
0299             , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
0300         >
0301     {};
0302     template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
0303     struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
0304         , void>
0305     {
0306         typedef
0307             list10<
0308                 typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type , typename boost::proto::detail::protoify< A5 , Domain >::result_type , typename boost::proto::detail::protoify< A6 , Domain >::result_type , typename boost::proto::detail::protoify< A7 , Domain >::result_type , typename boost::proto::detail::protoify< A8 , Domain >::result_type , typename boost::proto::detail::protoify< A9 , Domain >::result_type
0309             >
0310         proto_args;
0311         typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
0312         typedef typename Domain::proto_generator proto_generator;
0313         typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
0314         BOOST_FORCEINLINE
0315         result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4 , typename add_reference<A5 >::type a5 , typename add_reference<A6 >::type a6 , typename add_reference<A7 >::type a7 , typename add_reference<A8 >::type a8 , typename add_reference<A9 >::type a9) const
0316         {
0317             expr_type const that = {
0318                 boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4) , boost::proto::detail::protoify< A5 , Domain >()(a5) , boost::proto::detail::protoify< A6 , Domain >()(a6) , boost::proto::detail::protoify< A7 , Domain >()(a7) , boost::proto::detail::protoify< A8 , Domain >()(a8) , boost::proto::detail::protoify< A9 , Domain >()(a9)
0319             };
0320             return proto_generator()(that);
0321         }
0322     };
0323     template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
0324     struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
0325         , void>
0326       : make_expr_<
0327             Tag
0328           , typename deduce_domain10<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>::type
0329             , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
0330         >
0331     {};