12 #ifndef DOCWIRE_INVOCATION_TRAITS_H
13 #define DOCWIRE_INVOCATION_TRAITS_H
15 #include <boost/callable_traits/args.hpp>
16 #include <boost/callable_traits/return_type.hpp>
56 using type = boost::callable_traits::args_t<F>;
60 requires requires {
typename F::invocation_args_t; }
63 using type =
typename F::invocation_args_t;
74 using type =
typename args_impl<T>::type;
94 inline constexpr std::size_t arity_v = std::tuple_size_v<args_t<T>>;
114 template <
typename T>
120 template <
typename F>
123 using type = boost::callable_traits::return_type_t<F>;
126 template <
typename F>
127 requires requires {
typename F::invocation_result_t; }
128 struct result_impl<F>
130 using type =
typename F::invocation_result_t;
141 using type =
typename result_impl<T>::type;
157 template <
typename T>
177 template <
typename T>
186 requires {
typename boost::callable_traits::args_t<T>; } ||
187 requires {
typename std::decay_t<T>::invocation_args_t; };
210 template <
typename T>
Provides traits classes for working with callable objects.
typename result< T >::type result_t
Type alias for the type member of the result struct.
typename args< T >::type args_t
Type alias for the type member of the args struct.
constexpr bool is_invocable_v
Variable template alias for the value of the is_invocable trait.
requires(!string_method_equipped< T >) struct stringifier< T >
Specialization for types that are streamable to std::ostream.
Extracts the argument types of a callable object.
typename args_impl< T >::type type
Type of the arguments of the callable object.
Trait that checks if a type is invocable.
static constexpr bool value
Whether the type is invocable.
Extracts the result type of a callable object.
typename result_impl< T >::type type
Type of the result of the callable object.