[Bug c++/95686] undefined reference to static local variable within inline function
leni536 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Jun 16 07:14:42 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95686
--- Comment #2 from Lénárd Szolnoki <leni536 at gmail dot com> ---
I failed to mention that I compiled the example in -std=c++17. With this
compiler option it compiles but fails to link in gcc. It compiles, links and
runs as expected in clang.
The linkage requirement for reference/pointer non-type template arguments were
lifted in C++17.
More information about the Gcc-bugs
mailing list