[Bug libstdc++/80811] out-of-line string members less efficient than they could be
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu May 18 22:52:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80811
--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> ---
That does work. I had tried with the attribute on the end of the declaration
and it barfed.
I was going to say I'd worry that declaring the members extern template might
effectively hide them from their bodies optimizer and pessimize other code, but
I see that the whole std::string specialization is declared extern template so
it's already hidden, which is why the optimization doesn't happen to begin
with.
More information about the Gcc-bugs
mailing list