Look at the following code snippet template<int a> struct A { static const int value; }; template<int a> const int A< a>::template value = 0; ^^^^^^^^ This template keyword is not allowed, because value is not template by itself but g++ accept this code without any complaints.
The invalid code is still accepted by GCC 8.0/
Dup of bug 55588. *** This bug has been marked as a duplicate of bug 55588 ***