GCC7/8 fails to compile the following code: ``` template <class T, class U=double> struct X {}; typedef X<int, double> Xint; // `typedef X<int> Xint` fails to compile with the same error. template <class U> struct Y {}; Y<Xint> abc; template <template <class> class TT, class T> struct Y<TT<T>> {}; int main() {} ``` with: ``` ./a.cpp:5:54: error: partial specialization of 'struct Y<TT<T> >' after instantiation of 'struct Y<X<int, double> >' [-fpermissiv] template <template <class> class TT, class T> struct Y<TT<T>> {}; ``` if `-std=c++1z` is specified. Compiling with `-std=c++14` works fine. Removing the default argument of template parameter `U` of class `X`, or defaulting `U` to some other type rather than `double` (the second argument used in typedef'ing `Xint`) makes the code to compile. It seems that the default argument of template parameter somehow removes the corresponding template parameter from what GCC concerns when doing pattern matching. GCC6 compiles the code, whether '-std=c++14' or '-std=c++1z' is specified. Clang compiles the code as well.
This is the result of DR 150/P0522R0.
Let's close it then. Sorry for the noise.