https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100032
Bug ID: 100032
Summary: renaming alias template that also adds cv-qualifiers
is deemed equivalent to underlying template
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ppalka at gcc dot gnu.org
Target Milestone: ---
DR 1286 allows alias templates to be equivalent to the underlying template if
the alias is just a renaming of the underlying template. In the testcase
below, Z is arguably not equivalent to Y because of the added const qualifier,
but GCC still deems them equivalent, and accepts the testcase.
template <template<class> class> struct X { };
template <class> struct Y { };
template <class T> using Z = const Y<T>;
using T = X<Y>;
using T = X<Z>;