https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86138
--- Comment #24 from Jonathan Wakely <redi at gcc dot gnu.org> --- Author: redi Date: Wed Jun 27 00:11:53 2018 New Revision: 262167 URL: https://gcc.gnu.org/viewcvs?rev=262167&root=gcc&view=rev Log: Declare some explicit instantiations for strings in Debug Mode The empty reps and the I/O functions do not need to be implicitly instantiated to enable assertions, so declare the explicit instantiations when _GLIBCXX_EXTERN_TEMPLATE == -1 (i.e. when _GLIBCXX_ASSERTIONS is defined). PR libstdc++/86138 * include/bits/basic_string.tcc: [_GLIBCXX_EXTERN_TEMPLATE < 0] Declare explicit instantiations of COW empty reps and I/O functions. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/include/bits/basic_string.tcc