- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
// https://habr.com/post/417027/
// Как я стандартную библиотеку C++11 писал или почему boost такой страшный
// https://github.com/oktonion/stdex/blob/1472fd5e2f5e0d10a136518631055c3aad2e1cfd/stdex/include/thread.hpp#L51
template<class R, class T1>
struct _function_traits<R(*)(T1)>
{
typedef R result_type;
typedef T1 arg1_type;
typedef T1 argument_type;
};
template<class R, class T1, class T2>
struct _function_traits<R(*)(T1, T2)>
{
typedef R result_type;
typedef T1 arg1_type;
typedef T2 arg2_type;
};
template<class R, class T1, class T2, class T3>
struct _function_traits<R(*)(T1, T2, T3)>
{
typedef R result_type;
typedef T1 arg1_type;
typedef T2 arg2_type;
typedef T3 arg3_type;
};
template<class R, class T1, class T2, class T3, class T4>
struct _function_traits<R(*)(T1, T2, T3, T4)>
{
typedef R result_type;
typedef T1 arg1_type;
typedef T2 arg2_type;
typedef T3 arg3_type;
typedef T4 arg4_type;
};
template<class R, class T1, class T2, class T3, class T4,
class T5>
struct _function_traits<R(*)(T1, T2, T3, T4, T5)>
{
typedef R result_type;
typedef T1 arg1_type;
typedef T2 arg2_type;
typedef T3 arg3_type;
typedef T4 arg4_type;
typedef T5 arg5_type;
};
template<class R, class T1, class T2, class T3, class T4,
class T5, class T6>
struct _function_traits<R(*)(T1, T2, T3, T4, T5, T6)>
{
typedef R result_type;
typedef T1 arg1_type;
typedef T2 arg2_type;
typedef T3 arg3_type;
typedef T4 arg4_type;
typedef T5 arg5_type;
typedef T6 arg6_type;
};
template<class R, class T1, class T2, class T3, class T4,
class T5, class T6, class T7>
struct _function_traits<R(*)(T1, T2, T3, T4, T5, T6, T7)>
{
typedef R result_type;
typedef T1 arg1_type;
typedef T2 arg2_type;
typedef T3 arg3_type;
typedef T4 arg4_type;
typedef T5 arg5_type;
typedef T6 arg6_type;
typedef T7 arg7_type;
};
...