...
This commit is contained in:
@@ -124,15 +124,26 @@ template <typename F>
|
||||
struct mcc_func_traits<F&&> : mcc_func_traits<F> {
|
||||
};
|
||||
|
||||
// type of the returned value
|
||||
template <typename T>
|
||||
using mcc_retval_t = typename mcc_func_traits<T>::ret_t;
|
||||
|
||||
// type of the first argument of callable
|
||||
template <typename T>
|
||||
using mcc_func_arg1_t = typename mcc_func_traits<T>::arg1_t;
|
||||
|
||||
// type of the N-th argument of callable
|
||||
// NOTE: starts from 1 not from 0!!!
|
||||
template <typename T, size_t N = 1>
|
||||
using mcc_func_argN_t = std::
|
||||
conditional_t<N >= mcc_func_traits<T>::arity, std::tuple_element_t<N, typename mcc_func_traits<T>::args_t>, void>;
|
||||
using mcc_func_argN_t = std::conditional_t<N >= mcc_func_traits<T>::arity,
|
||||
std::tuple_element_t<N - 1, typename mcc_func_traits<T>::args_t>,
|
||||
void>;
|
||||
|
||||
|
||||
// non-const lvalue reference, constructible from CtorArgTs (an output argument of function)
|
||||
template <typename T, typename... CtorArgTs>
|
||||
concept mcc_output_arg_c = !std::is_const_v<std::remove_reference_t<T>> && std::is_lvalue_reference_v<T> &&
|
||||
std::constructible_from<std::remove_reference_t<T>, CtorArgTs...>;
|
||||
|
||||
namespace details
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user