Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 1 | |
| 2 | // (C) Copyright Tobias Schwinger |
| 3 | // |
| 4 | // Use modification and distribution are subject to the boost Software License, |
| 5 | // Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). |
| 6 | |
| 7 | //------------------------------------------------------------------------------ |
| 8 | |
| 9 | // no include guards, this file is intended for multiple inclusion |
| 10 | |
| 11 | // input: BOOST_FT_syntax type macro to use |
| 12 | // input: BOOST_FT_cc empty or cc specifier |
| 13 | // input: BOOST_FT_ell empty or "..." |
| 14 | // input: BOOST_FT_cv empty or cv qualifiers |
| 15 | // input: BOOST_FT_flags single decimal integer encoding the flags |
| 16 | // output: BOOST_FT_n number of component types (arity+1) |
| 17 | // output: BOOST_FT_arity current arity |
| 18 | // output: BOOST_FT_type macro that expands to the type |
| 19 | // output: BOOST_FT_tplargs(p) template arguments with given prefix |
| 20 | // output: BOOST_FT_params(p) parameters with given prefix |
| 21 | |
| 22 | template< typename R, typename L> |
| 23 | struct components_impl<BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (BOOST_FT_nullary_param BOOST_FT_ell) BOOST_FT_cv, L> |
| 24 | { |
| 25 | typedef encode_bits<BOOST_FT_flags,BOOST_FT_cc_id> bits; |
| 26 | typedef constant<BOOST_FT_full_mask> mask; |
| 27 | typedef function_types::components<BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (BOOST_FT_nullary_param BOOST_FT_ell) BOOST_FT_cv, L> type; |
| 28 | typedef components_mpl_sequence_tag tag; |
| 29 | typedef mpl::integral_c<std::size_t,0> function_arity; |
| 30 | typedef mpl::vector1< R BOOST_FT_nullary_param > types; |
| 31 | }; |
| 32 | template< typename R , typename T0, typename L> |
| 33 | struct components_impl<BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 BOOST_FT_ell) BOOST_FT_cv, L> |
| 34 | { |
| 35 | typedef encode_bits<BOOST_FT_flags,BOOST_FT_cc_id> bits; |
| 36 | typedef constant<BOOST_FT_full_mask> mask; |
| 37 | typedef function_types::components<BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 BOOST_FT_ell) BOOST_FT_cv, L> type; |
| 38 | typedef components_mpl_sequence_tag tag; |
| 39 | typedef mpl::integral_c<std::size_t,1> function_arity; |
| 40 | typedef mpl::vector2< R , T0 > types; |
| 41 | }; |
| 42 | template< typename R , typename T0 , typename T1, typename L> |
| 43 | struct components_impl<BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 BOOST_FT_ell) BOOST_FT_cv, L> |
| 44 | { |
| 45 | typedef encode_bits<BOOST_FT_flags,BOOST_FT_cc_id> bits; |
| 46 | typedef constant<BOOST_FT_full_mask> mask; |
| 47 | typedef function_types::components<BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 BOOST_FT_ell) BOOST_FT_cv, L> type; |
| 48 | typedef components_mpl_sequence_tag tag; |
| 49 | typedef mpl::integral_c<std::size_t,2> function_arity; |
| 50 | typedef mpl::vector3< R , T0 , T1 > types; |
| 51 | }; |
| 52 | template< typename R , typename T0 , typename T1 , typename T2, typename L> |
| 53 | struct components_impl<BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 BOOST_FT_ell) BOOST_FT_cv, L> |
| 54 | { |
| 55 | typedef encode_bits<BOOST_FT_flags,BOOST_FT_cc_id> bits; |
| 56 | typedef constant<BOOST_FT_full_mask> mask; |
| 57 | typedef function_types::components<BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 BOOST_FT_ell) BOOST_FT_cv, L> type; |
| 58 | typedef components_mpl_sequence_tag tag; |
| 59 | typedef mpl::integral_c<std::size_t,3> function_arity; |
| 60 | typedef mpl::vector4< R , T0 , T1 , T2 > types; |
| 61 | }; |
| 62 | template< typename R , typename T0 , typename T1 , typename T2 , typename T3, typename L> |
| 63 | struct components_impl<BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 BOOST_FT_ell) BOOST_FT_cv, L> |
| 64 | { |
| 65 | typedef encode_bits<BOOST_FT_flags,BOOST_FT_cc_id> bits; |
| 66 | typedef constant<BOOST_FT_full_mask> mask; |
| 67 | typedef function_types::components<BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 BOOST_FT_ell) BOOST_FT_cv, L> type; |
| 68 | typedef components_mpl_sequence_tag tag; |
| 69 | typedef mpl::integral_c<std::size_t,4> function_arity; |
| 70 | typedef mpl::vector5< R , T0 , T1 , T2 , T3 > types; |
| 71 | }; |
| 72 | template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4, typename L> |
| 73 | struct components_impl<BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 BOOST_FT_ell) BOOST_FT_cv, L> |
| 74 | { |
| 75 | typedef encode_bits<BOOST_FT_flags,BOOST_FT_cc_id> bits; |
| 76 | typedef constant<BOOST_FT_full_mask> mask; |
| 77 | typedef function_types::components<BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 BOOST_FT_ell) BOOST_FT_cv, L> type; |
| 78 | typedef components_mpl_sequence_tag tag; |
| 79 | typedef mpl::integral_c<std::size_t,5> function_arity; |
| 80 | typedef mpl::vector6< R , T0 , T1 , T2 , T3 , T4 > types; |
| 81 | }; |
| 82 | template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5, typename L> |
| 83 | struct components_impl<BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 BOOST_FT_ell) BOOST_FT_cv, L> |
| 84 | { |
| 85 | typedef encode_bits<BOOST_FT_flags,BOOST_FT_cc_id> bits; |
| 86 | typedef constant<BOOST_FT_full_mask> mask; |
| 87 | typedef function_types::components<BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 BOOST_FT_ell) BOOST_FT_cv, L> type; |
| 88 | typedef components_mpl_sequence_tag tag; |
| 89 | typedef mpl::integral_c<std::size_t,6> function_arity; |
| 90 | typedef mpl::vector7< R , T0 , T1 , T2 , T3 , T4 , T5 > types; |
| 91 | }; |
| 92 | template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6, typename L> |
| 93 | struct components_impl<BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 BOOST_FT_ell) BOOST_FT_cv, L> |
| 94 | { |
| 95 | typedef encode_bits<BOOST_FT_flags,BOOST_FT_cc_id> bits; |
| 96 | typedef constant<BOOST_FT_full_mask> mask; |
| 97 | typedef function_types::components<BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 BOOST_FT_ell) BOOST_FT_cv, L> type; |
| 98 | typedef components_mpl_sequence_tag tag; |
| 99 | typedef mpl::integral_c<std::size_t,7> function_arity; |
| 100 | typedef mpl::vector8< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 > types; |
| 101 | }; |
| 102 | template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7, typename L> |
| 103 | struct components_impl<BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 BOOST_FT_ell) BOOST_FT_cv, L> |
| 104 | { |
| 105 | typedef encode_bits<BOOST_FT_flags,BOOST_FT_cc_id> bits; |
| 106 | typedef constant<BOOST_FT_full_mask> mask; |
| 107 | typedef function_types::components<BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 BOOST_FT_ell) BOOST_FT_cv, L> type; |
| 108 | typedef components_mpl_sequence_tag tag; |
| 109 | typedef mpl::integral_c<std::size_t,8> function_arity; |
| 110 | typedef mpl::vector9< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 > types; |
| 111 | }; |
| 112 | template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8, typename L> |
| 113 | struct components_impl<BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 BOOST_FT_ell) BOOST_FT_cv, L> |
| 114 | { |
| 115 | typedef encode_bits<BOOST_FT_flags,BOOST_FT_cc_id> bits; |
| 116 | typedef constant<BOOST_FT_full_mask> mask; |
| 117 | typedef function_types::components<BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 BOOST_FT_ell) BOOST_FT_cv, L> type; |
| 118 | typedef components_mpl_sequence_tag tag; |
| 119 | typedef mpl::integral_c<std::size_t,9> function_arity; |
| 120 | typedef mpl::vector10< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 > types; |
| 121 | }; |
| 122 | template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9, typename L> |
| 123 | struct components_impl<BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 BOOST_FT_ell) BOOST_FT_cv, L> |
| 124 | { |
| 125 | typedef encode_bits<BOOST_FT_flags,BOOST_FT_cc_id> bits; |
| 126 | typedef constant<BOOST_FT_full_mask> mask; |
| 127 | typedef function_types::components<BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 BOOST_FT_ell) BOOST_FT_cv, L> type; |
| 128 | typedef components_mpl_sequence_tag tag; |
| 129 | typedef mpl::integral_c<std::size_t,10> function_arity; |
| 130 | typedef mpl::vector11< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 > types; |
| 131 | }; |
| 132 | |