On Sat, 14 Mar 2026 at 20:40, François Dumont <[email protected]> wrote: > > Patch extracted from this PR: > > https://forge.sourceware.org/gcc/gcc-TEST/pulls/136 > > I was able to reproduce the bug in the context the same PR on those tests: > > 23_containers/vector/bool/capacity/constexpr.cc > 23_containers/vector/bool/modifiers/constexpr.cc > 23_containers/vector/modifiers/constexpr.cc > > It was the reason of doing this change in the PR.
OK, thanks. This is a simpler solution than my attempts. > > libstdc++: [_GLIBCXX_DEBUG] _M_invalidate_if incompatible with > C++20 [PR124444] > > __gnu_cxx::__scoped_lock cannot be instantiated in a C++20 > constexpr function. > > libstdc++-v3/ChangeLog: > > * include/debug/safe_sequence.h > (_Safe_sequence::_M_invalidate_if_impl): New. > (_Safe_sequence::_M_invalidate_if): Call later if not > __is_constant_evaluated. > * include/debug/safe_sequence.tcc: Rename _M_invalidate_if into > _M_invalidate_if_impl and remove C++20 constexpr. > > Tested under Linux x86_64 _GLIBCXX_DEBUG mode. > > Ok to commit ? > > François
