Template template partial specialization only working with -std=c++1z with g++
I have found that the following piece of code: #include <iostream> #include <vector> template <typename T> struct X : std::false_type {}; template <template <typename> class Y, typename U> struct X<Y<U>> : std::true_type {}; int main() { if (X<int>()) std::cout << "wrong\n"; if (X<std::vector<double>>()) std::cout << "correct\n"; return 0; } Only prints correct when compiled with g++-7 with -std=c++1z . Other versions of g++ , clang++ or other std flags fail to produce correct. Is this a bug of the current implementation, and this code should not print anything, or is something changed in C+