https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108886
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- Why are you suggesting adding a check in two places when the first one just calls the second one? What would be the point of _GLIBCXX_DEBUG_PEDASSERT when there's already a debug assertion there? Compiling with _GLIBCXX_DEBUG will already abort. I don't see the point of adding anything to char_traits at all. It's a very low-level interface and you probably shouldn't be (and aren't) using it directly anyway.