5 #ifndef VCCC_TYPE_TRAITS_IS_INVOCABLE_HPP
6 #define VCCC_TYPE_TRAITS_IS_INVOCABLE_HPP
24 struct satisfies_invocable_type : disjunction<is_complete<T>, std::is_void<T>, is_unbounded_array<T>> {};
26 template<
typename R,
typename F,
typename ...Args>
27 struct is_invocable_r_impl {
34 template<
typename F2,
typename ...Args2>
36 noexcept(noexcept(detail::INVOKE(std::declval<F2>(), std::declval<Args2>()...)))
37 -> decltype(detail::INVOKE(std::declval<F2>(), std::declval<Args2>()...));
38 template<
typename F2,
typename ...Args2>
39 static auto test(...) ->
empty;
42 using test_return_type = decltype(test<F, Args...>(0));
43 using convertible = disjunction<std::is_void<R>, std::is_convertible<test_return_type, R>>;
44 using invocable = conjunction<negation<std::is_same<test_return_type, empty>>, convertible>;
45 using nothrow_invocable = conjunction<invocable,
bool_constant<noexcept(test<F, Args...>(0))>>;
58 template<
typename F,
typename ...Args>
61 detail::is_invocable_r_impl<void, F, Args...>::invocable::value,
62 type_identity<typename detail::is_invocable_r_impl<void, F, Args...>::test_return_type>,
65 template<
typename F,
typename ...Args>
76 template<
typename F,
typename ...Args>
83 template<
typename R,
typename F,
typename ...Args>
90 template<
typename F,
typename ...Args>
97 template<
typename R,
typename F,
typename ...Args>
constexpr VCCC_INLINE_OR_STATIC detail::empty_niebloid empty
checks whether a range is empty
Definition: empty.hpp:116
std::integral_constant< bool, v > bool_constant
Definition: bool_constant.hpp:19
typename invoke_result< F, Args... >::type invoke_result_t
Definition: is_invocable.hpp:66
Definition: directory.h:12
specifies that a callable type can be invoked with a given set of argument types
Definition: invocable.hpp:52
deduces the result type of invoking a callable object with a set of arguments
Definition: is_invocable.hpp:63
Determines whether INVOKE<R>(std::declval<Fn>(), std::declval<ArgTypes>()...) is well formed when tre...
Definition: is_invocable.hpp:84
Determines whether INVOKE(std::declval<Fn>(), std::declval<ArgTypes>()...) is well formed when treate...
Definition: is_invocable.hpp:77
Determines whether INVOKE<R>(std::declval<Fn>(), std::declval<ArgTypes>()...) is well formed when tre...
Definition: is_invocable.hpp:98
Determines whether INVOKE(std::declval<Fn>(), std::declval<ArgTypes>()...) is well formed when treate...
Definition: is_invocable.hpp:91