Question
are constrained alias templates allowed?
Checked the three major compilers, they all allow putting constraints on alias templates, for example:
template<class T, std::constructible_from<T> V>
using var_t = std::variant<T, V>;
template<class T, class...Args>
requires(std::constructible_from<T, Args...>)
using tup_t = std::tuple<T, Args...>;
But then cppreference has this to say:
Syntax
Alias declarations are declarations with the following syntax:
using identifier attr (optional) = type-id ; (1)
template < template-parameter-list >
using identifier attr (optional) = type-id ; (2)
Is cpprefrence wrong and constraints are allowed?
4 83
4