https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118341
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Sam James from comment #1) > -D_GLIBCXX_DEBUG does fire on that mystery c[4] case but none of the others. There's a __gnu_debug::bitset class that replaces std::bitset in debug mode. The const_c[4] case is not checked by the debug container in C++11 and later because (IIRC) the debug checks used to be incompatible with constexpr. I think that was fixed long ago so we could enable it for const_c[4] now. But we should just add assertions to std::bitset and then we might not need the __gnu_debug::bitset one at all.