Is it possible to write a variadic version of std::is_convertible
? For example are_convertible<T1, T2, T3, T4>
would return is_convertible<T1, T3> && is_convertible<T2, T4>
. I've been thinking about this for a few hours but couldn't come up with anything reasonable.
To clarify I want to use it somewhat like this:
template <class ...Args1>
struct thing
{
template <class ...Args2>
enable_if_t<are_convertible<Args2..., Args1...>::value>
foo(Args2 &&...args){}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With