struct X
{
template <typename>
struct Y;
template <>
struct Y<int>
{
};
};
This code does not compile with GCC (even GCC 10 Link) with the following error message
error: explicit specialization in non-namespace scope 'struct X'
according to cpp reference
Explicit specialization may be declared in any scope where its primary template may be defined
Also we have this defect report where the behavior was changed to allow this code to compile CWG 727
However in this question some comment
So far, this does not seem fixed and gcc dev claims that cwg727 never was approved. – Swift - Friday Pie Nov 22 '19 at 19:11
said that this defect report was not approved. Is that true? Is this a gcc bug failing to comply with the standard or not?