https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57728
Jens Maurer <jens.maurer at gmx dot net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jens.maurer at gmx dot net --- Comment #13 from Jens Maurer <jens.maurer at gmx dot net> --- This bug saw its last activity nearly a year ago, with patches from Jason applied, but the issue does not seem to be fixed in its entirety (using gcc 7.2). Specifically, this translation unit: template<class T> struct C { C() = default; void f() { } int i = 5; }; template class C<int>; causes C<int>::f() to be defined, but the defaulted constructor of C<int> is not defined. (Replacing "= default" with "{}" causes definition of the C<int> constructor.) $ nm -C x.o 0000000000000000 W C<int>::f() The current behavior is obviously not what we want if we choose to use explicit instantiations.