File tree Expand file tree Collapse file tree 1 file changed +29
-29
lines changed
hdr/sqlite_modern_cpp/utility Expand file tree Collapse file tree 1 file changed +29
-29
lines changed Original file line number Diff line number Diff line change 33#include < tuple>
44
55namespace sqlite {
6- namespace utility {
7-
8- template <typename > struct function_traits ;
9-
10- template <typename Function>
11- struct function_traits : public function_traits <
12- decltype (&Function::operator ())
13- > { };
14-
15- template <
16- typename ClassType,
17- typename ReturnType,
18- typename ... Arguments
19- >
20- struct function_traits <
21- ReturnType (ClassType::*)(Arguments...) const
22- > {
23- typedef ReturnType result_type;
24-
25- template <std::size_t Index>
26- using argument = typename std::tuple_element<
27- Index,
28- std::tuple<Arguments...>
29- >::type;
30-
31- static const std::size_t arity = sizeof ...(Arguments);
32- };
33-
34- }
6+ namespace utility {
7+
8+ template <typename > struct function_traits ;
9+
10+ template <typename Function>
11+ struct function_traits : public function_traits <
12+ decltype (&Function::operator ())
13+ > { };
14+
15+ template <
16+ typename ClassType,
17+ typename ReturnType,
18+ typename ... Arguments
19+ >
20+ struct function_traits <
21+ ReturnType (ClassType::*)(Arguments...) const
22+ > {
23+ typedef ReturnType result_type;
24+
25+ template <std::size_t Index>
26+ using argument = typename std::tuple_element<
27+ Index,
28+ std::tuple<Arguments...>
29+ >::type;
30+
31+ static const std::size_t arity = sizeof ...(Arguments);
32+ };
33+
34+ }
3535}
You can’t perform that action at this time.
0 commit comments