|
8 | 8 |
|
9 | 9 | namespace <a href='doc_function_ref.html#function_ref.hpp'>tl</a> |
10 | 10 | { |
11 | | - namespace <a href='doc_function_ref.html#function_ref.hpp'>detail</a> |
12 | | - { |
13 | | - template <class T> |
14 | | - using <a href='doc_function_ref.html#function_ref.hpp'>remove_const_t</a> = typename std::remove_const<T>::type; |
15 | | - |
16 | | - template <class T> |
17 | | - using <a href='doc_function_ref.html#function_ref.hpp'>remove_reference_t</a> = typename std::remove_reference<T>::type; |
18 | | - |
19 | | - template <class T> |
20 | | - using <a href='doc_function_ref.html#function_ref.hpp'>decay_t</a> = typename std::decay<T>::type; |
21 | | - |
22 | | - template <bool E, class T = void> |
23 | | - using <a href='doc_function_ref.html#function_ref.hpp'>enable_if_t</a> = typename std::enable_if<E, T>::type; |
24 | | - |
25 | | - template <bool B, class T, class F> |
26 | | - using <a href='doc_function_ref.html#function_ref.hpp'>conditional_t</a> = typename std::conditional<B, T, F>::type; |
27 | | - |
28 | | - template <typename Fn, typename ... Args, typename = enable_if_t<std::is_member_pointer<decay_t<Fn>>::value>, int=0> |
29 | | - constexpr decltype(std::mem_fn(f)(std::forward<Args>(args)...)) <a href='doc_function_ref.html#function_ref.hpp'>invoke</a>(Fn&& f, Args&&... args) noexcept(noexcept(std::mem_fn(f)(std::forward<Args>(args)...))); |
30 | | - |
31 | | - template <typename Fn, typename ... Args, typename = enable_if_t<!std::is_member_pointer<decay_t<Fn>>{}>> |
32 | | - constexpr decltype(std::forward<Fn>(f)(std::forward<Args>(args)...)) <a href='doc_function_ref.html#function_ref.hpp'>invoke</a>(Fn&& f, Args&&... args) noexcept(noexcept(std::forward<Fn>(f)(std::forward<Args>(args)...))); |
33 | | - |
34 | | - template <class F, class ... Us> |
35 | | - struct <a href='doc_function_ref.html#function_ref.hpp'>invoke_result_impl<F, decltype(invoke(std::declval<F>(), std::declval<Us>()...), void()), Us...></a>; |
36 | | - |
37 | | - template <class F, class ... Us> |
38 | | - using <a href='doc_function_ref.html#function_ref.hpp'>invoke_result</a> = invoke_result_impl<F, void, Us...>; |
39 | | - |
40 | | - template <class F, class ... Us> |
41 | | - using <a href='doc_function_ref.html#function_ref.hpp'>invoke_result_t</a> = typename invoke_result<F, Us...>::type; |
42 | | - |
43 | | - template <class, class R, class F, class ... Args> |
44 | | - struct <a href='doc_function_ref.html#function_ref.hpp'>is_invocable_r_impl</a>; |
45 | | - |
46 | | - template <class R, class F, class ... Args> |
47 | | - struct <a href='doc_function_ref.html#function_ref.hpp'>is_invocable_r_impl<typename std::is_same<invoke_result_t<F, Args...>, R>::type, R, F, Args...></a>; |
48 | | - |
49 | | - template <class R, class F, class ... Args> |
50 | | - using <a href='doc_function_ref.html#function_ref.hpp'>is_invocable_r</a> = <a href='doc_function_ref.html#function_ref.hpp'>is_invocable_r_impl<std::true_type, R, F, Args...></a>; |
51 | | - } |
52 | | - |
53 | 11 | template <class R, class ... Args> |
54 | 12 | class <a href='doc_function_ref.html#tl::function_ref-R(Args...)-'>function_ref<R(Args...)></a>; |
55 | 13 |
|
|
0 commit comments