https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103635
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- There's an explicit instantiation declaration at the end of the header, which means the entire thing is externally defined in libstdc++.so and the only code that gets instantiated in your own translation unit is for tiny functions which are inlined. The rest will refer to the extern template definitions in the shared library.