https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99871
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- I wonder if there's a reason we don't just put the visibility on the namespace the way we do elsewhere: namespace std _GLIBCXX_VISIBILITY(default) I will do that, or just move the pragma after the includes.