blob: 21364a84be4c8a2007a841f838f14bfba86aee57 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#ifndef TYPEASVALUE_SRC_FUNCTION_APPLY_H_
#define TYPEASVALUE_SRC_FUNCTION_APPLY_H_
#include "conditional/if.h"
#include "detail/apply.h"
namespace tav {
typedef detail::placeholder<0> _0;
typedef detail::placeholder<1> _1;
typedef detail::placeholder<2> _2;
typedef detail::placeholder<3> _3;
template <
template<typename...> class Function,
typename... Arguments
>
struct Apply : If<
(detail::count_placeholders<Arguments...>::type::value > 2),
detail::apply_variadic<Function, Arguments...>,
typename If<
detail::count_placeholders<Arguments...>::type::value == 2,
detail::apply_pair<Function, Arguments...>,
detail::apply_single<Function, Arguments...>
>::type
>::type { };
}
#endif // TYPEASVALUE_SRC_FUNCTION_APPLY_H_
|