Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:43:28

0001 // Copyright David Abrahams, Daniel Wallin 2003.
0002 // Distributed under the Boost Software License, Version 1.0.
0003 // (See accompanying file LICENSE_1_0.txt or copy at
0004 // http://www.boost.org/LICENSE_1_0.txt)
0005 
0006 // This file generates overloads in this format:
0007 //
0008 //     template <typename A0, typename A1>
0009 //     typename ::boost::mpl::apply_wrap1<
0010 //         ::boost::parameter::aux::make_arg_list<
0011 //             PS0,A0
0012 //           , ::boost::parameter::aux::make_arg_list<
0013 //                 PS1,A1
0014 //               , ::boost::mpl::identity<
0015 //                     ::boost::parameter::aux::empty_arg_list
0016 //                 >
0017 //             >
0018 //         >
0019 //      , unnamed_list
0020 //     >::type
0021 //         operator()(A0 const& a0, A1 const& a1) const
0022 //     {
0023 //         typedef typename ::boost::mpl::apply_wrap1<
0024 //             ::boost::parameter::aux::make_arg_list<
0025 //                 PS0,A0
0026 //               , ::boost::parameter::aux::make_arg_list<
0027 //                     PS1,A1
0028 //                   , ::boost::mpl::identity<
0029 //                         ::boost::parameter::aux::empty_arg_list
0030 //                     >
0031 //                 >
0032 //             >
0033 //         >::type arg_tuple;
0034 //
0035 //         return arg_tuple(
0036 //             a0
0037 //           , a1
0038 //           , ::boost::parameter::aux::void_()
0039 //             ...
0040 //         );
0041 //     }
0042 //
0043 
0044 #if !defined(BOOST_PP_IS_ITERATING)
0045 # error Boost.Parameters - do not include this file!
0046 #endif
0047 
0048 #define N BOOST_PP_ITERATION()
0049 
0050 #define BOOST_PARAMETER_open_list(z, n, text) \
0051     ::boost::parameter::aux::item< \
0052         BOOST_PP_CAT(PS, n), BOOST_PP_CAT(A, n)
0053 
0054 #define BOOST_PARAMETER_close_list(z, n, text) >
0055 
0056 #define BOOST_PARAMETER_arg_list(n) \
0057     ::boost::parameter::aux::make_arg_list< \
0058         BOOST_PP_ENUM(N, BOOST_PARAMETER_open_list, _) \
0059       , ::boost::parameter::void_ \
0060         BOOST_PP_REPEAT(N, BOOST_PARAMETER_close_list, _) \
0061       , deduced_list \
0062       , ::boost::parameter::aux::tag_keyword_arg \
0063     >
0064 
0065 #define BOOST_PARAMETER_arg_pack_init(z, n, limit) \
0066     BOOST_PP_CAT(a, BOOST_PP_SUB(limit, n))
0067 
0068 template <BOOST_PP_ENUM_PARAMS(N, typename A)>
0069 typename ::boost::mpl::first<
0070     typename BOOST_PARAMETER_arg_list(N)::type
0071 >::type
0072     operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, & a)) const
0073 {
0074     typedef typename BOOST_PARAMETER_arg_list(N)::type result;
0075     typedef typename ::boost::mpl::first<result>::type result_type;
0076     typedef typename ::boost::mpl::second<result>::type error;
0077     error();
0078 
0079     return result_type(
0080         BOOST_PP_ENUM(N, BOOST_PARAMETER_arg_pack_init, BOOST_PP_DEC(N))
0081         BOOST_PP_ENUM_TRAILING_PARAMS(
0082             BOOST_PP_SUB(BOOST_PARAMETER_COMPOSE_MAX_ARITY, N)
0083           , ::boost::parameter::aux::void_reference() BOOST_PP_INTERCEPT
0084         )
0085     );
0086 }
0087 
0088 #undef BOOST_PARAMETER_arg_list
0089 #undef BOOST_PARAMETER_close_list
0090 #undef BOOST_PARAMETER_open_list
0091 #undef N
0092