https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16582
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- C++11/C++14/C++98 gives: <source>:8:13: error: template argument 2 is invalid 8 | X<int, &p[0]> x3; // ERROR | ^ While C++17 gives: <source>:8:8: error: '& p[0]' is not a valid template argument of type 'char*' because 'p[0]' is not a variable 8 | X<int, &p[0]> x3; // ERROR | ^~~~~ And C++20 accepts the code. Note clang accepts the code for C++17 and C++20.