https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53181
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> --- GCC 7 accepts it in C++17 mode because of r241137 Implement P0386R2 - C++17 inline variables That's because an out-of-class definition is not needed in C++17, the compiler will generate one from the in-class declaration.