Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 1 | |
| 2 | // Copyright Aleksey Gurtovoy 2000-2004 |
| 3 | // |
| 4 | // Distributed under the Boost Software License, Version 1.0. |
| 5 | // (See accompanying file LICENSE_1_0.txt or copy at |
| 6 | // http://www.boost.org/LICENSE_1_0.txt) |
| 7 | // |
| 8 | |
| 9 | // Preprocessed version of "ndnboost/mpl/apply.hpp" header |
| 10 | // -- DO NOT modify by hand! |
| 11 | |
| 12 | namespace ndnboost { namespace mpl { |
| 13 | |
| 14 | template< |
| 15 | typename F |
| 16 | > |
| 17 | struct apply0 |
| 18 | |
| 19 | : apply_wrap0< |
| 20 | typename lambda<F>::type |
| 21 | |
| 22 | > |
| 23 | { |
| 24 | BOOST_MPL_AUX_LAMBDA_SUPPORT( |
| 25 | 1 |
| 26 | , apply0 |
| 27 | , (F ) |
| 28 | ) |
| 29 | }; |
| 30 | |
| 31 | namespace aux { |
| 32 | |
| 33 | template<> |
| 34 | struct apply_chooser<0> |
| 35 | { |
| 36 | template< |
| 37 | typename F, typename T1, typename T2, typename T3, typename T4 |
| 38 | , typename T5 |
| 39 | > |
| 40 | struct result_ |
| 41 | { |
| 42 | typedef apply0< |
| 43 | F |
| 44 | > type; |
| 45 | }; |
| 46 | }; |
| 47 | |
| 48 | } // namespace aux |
| 49 | |
| 50 | template< |
| 51 | typename F, typename T1 |
| 52 | > |
| 53 | struct apply1 |
| 54 | |
| 55 | : apply_wrap1< |
| 56 | typename lambda<F>::type |
| 57 | , T1 |
| 58 | > |
| 59 | { |
| 60 | BOOST_MPL_AUX_LAMBDA_SUPPORT( |
| 61 | 2 |
| 62 | , apply1 |
| 63 | , (F, T1) |
| 64 | ) |
| 65 | }; |
| 66 | |
| 67 | namespace aux { |
| 68 | |
| 69 | template<> |
| 70 | struct apply_chooser<1> |
| 71 | { |
| 72 | template< |
| 73 | typename F, typename T1, typename T2, typename T3, typename T4 |
| 74 | , typename T5 |
| 75 | > |
| 76 | struct result_ |
| 77 | { |
| 78 | typedef apply1< |
| 79 | F, T1 |
| 80 | > type; |
| 81 | }; |
| 82 | }; |
| 83 | |
| 84 | } // namespace aux |
| 85 | |
| 86 | template< |
| 87 | typename F, typename T1, typename T2 |
| 88 | > |
| 89 | struct apply2 |
| 90 | |
| 91 | : apply_wrap2< |
| 92 | typename lambda<F>::type |
| 93 | , T1, T2 |
| 94 | > |
| 95 | { |
| 96 | BOOST_MPL_AUX_LAMBDA_SUPPORT( |
| 97 | 3 |
| 98 | , apply2 |
| 99 | , (F, T1, T2) |
| 100 | ) |
| 101 | }; |
| 102 | |
| 103 | namespace aux { |
| 104 | |
| 105 | template<> |
| 106 | struct apply_chooser<2> |
| 107 | { |
| 108 | template< |
| 109 | typename F, typename T1, typename T2, typename T3, typename T4 |
| 110 | , typename T5 |
| 111 | > |
| 112 | struct result_ |
| 113 | { |
| 114 | typedef apply2< |
| 115 | F, T1, T2 |
| 116 | > type; |
| 117 | }; |
| 118 | }; |
| 119 | |
| 120 | } // namespace aux |
| 121 | |
| 122 | template< |
| 123 | typename F, typename T1, typename T2, typename T3 |
| 124 | > |
| 125 | struct apply3 |
| 126 | |
| 127 | : apply_wrap3< |
| 128 | typename lambda<F>::type |
| 129 | , T1, T2, T3 |
| 130 | > |
| 131 | { |
| 132 | BOOST_MPL_AUX_LAMBDA_SUPPORT( |
| 133 | 4 |
| 134 | , apply3 |
| 135 | , (F, T1, T2, T3) |
| 136 | ) |
| 137 | }; |
| 138 | |
| 139 | namespace aux { |
| 140 | |
| 141 | template<> |
| 142 | struct apply_chooser<3> |
| 143 | { |
| 144 | template< |
| 145 | typename F, typename T1, typename T2, typename T3, typename T4 |
| 146 | , typename T5 |
| 147 | > |
| 148 | struct result_ |
| 149 | { |
| 150 | typedef apply3< |
| 151 | F, T1, T2, T3 |
| 152 | > type; |
| 153 | }; |
| 154 | }; |
| 155 | |
| 156 | } // namespace aux |
| 157 | |
| 158 | template< |
| 159 | typename F, typename T1, typename T2, typename T3, typename T4 |
| 160 | > |
| 161 | struct apply4 |
| 162 | |
| 163 | : apply_wrap4< |
| 164 | typename lambda<F>::type |
| 165 | , T1, T2, T3, T4 |
| 166 | > |
| 167 | { |
| 168 | BOOST_MPL_AUX_LAMBDA_SUPPORT( |
| 169 | 5 |
| 170 | , apply4 |
| 171 | , (F, T1, T2, T3, T4) |
| 172 | ) |
| 173 | }; |
| 174 | |
| 175 | namespace aux { |
| 176 | |
| 177 | template<> |
| 178 | struct apply_chooser<4> |
| 179 | { |
| 180 | template< |
| 181 | typename F, typename T1, typename T2, typename T3, typename T4 |
| 182 | , typename T5 |
| 183 | > |
| 184 | struct result_ |
| 185 | { |
| 186 | typedef apply4< |
| 187 | F, T1, T2, T3, T4 |
| 188 | > type; |
| 189 | }; |
| 190 | }; |
| 191 | |
| 192 | } // namespace aux |
| 193 | |
| 194 | template< |
| 195 | typename F, typename T1, typename T2, typename T3, typename T4 |
| 196 | , typename T5 |
| 197 | > |
| 198 | struct apply5 |
| 199 | |
| 200 | : apply_wrap5< |
| 201 | typename lambda<F>::type |
| 202 | , T1, T2, T3, T4, T5 |
| 203 | > |
| 204 | { |
| 205 | BOOST_MPL_AUX_LAMBDA_SUPPORT( |
| 206 | 6 |
| 207 | , apply5 |
| 208 | , (F, T1, T2, T3, T4, T5) |
| 209 | ) |
| 210 | }; |
| 211 | |
| 212 | namespace aux { |
| 213 | |
| 214 | template<> |
| 215 | struct apply_chooser<5> |
| 216 | { |
| 217 | template< |
| 218 | typename F, typename T1, typename T2, typename T3, typename T4 |
| 219 | , typename T5 |
| 220 | > |
| 221 | struct result_ |
| 222 | { |
| 223 | typedef apply5< |
| 224 | F, T1, T2, T3, T4, T5 |
| 225 | > type; |
| 226 | }; |
| 227 | }; |
| 228 | |
| 229 | } // namespace aux |
| 230 | |
| 231 | namespace aux { |
| 232 | |
| 233 | template< typename T > |
| 234 | struct is_apply_arg |
| 235 | { |
| 236 | static bool const value = true; |
| 237 | }; |
| 238 | |
| 239 | template<> |
| 240 | struct is_apply_arg<na> |
| 241 | { |
| 242 | static bool const value = false; |
| 243 | }; |
| 244 | |
| 245 | template< |
| 246 | typename T1, typename T2, typename T3, typename T4, typename T5 |
| 247 | > |
| 248 | struct apply_count_args |
| 249 | { |
| 250 | static int const value = is_apply_arg<T1>::value + is_apply_arg<T2>::value + is_apply_arg<T3>::value + is_apply_arg<T4>::value + is_apply_arg<T5>::value; |
| 251 | |
| 252 | }; |
| 253 | |
| 254 | } |
| 255 | |
| 256 | template< |
| 257 | typename F, typename T1 = na, typename T2 = na, typename T3 = na |
| 258 | , typename T4 = na, typename T5 = na |
| 259 | > |
| 260 | struct apply |
| 261 | : aux::apply_chooser< |
| 262 | aux::apply_count_args< T1,T2,T3,T4,T5 >::value |
| 263 | >::template result_< F,T1,T2,T3,T4,T5 >::type |
| 264 | { |
| 265 | }; |
| 266 | |
| 267 | }} |
| 268 | |