https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102712
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |WORKSFORME --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- You mean like this one? /usr/include/c++/11/optional:440: constexpr _Tp& std::_Optional_base_impl<_Tp, _Dp>::_M_get() [with _Tp = int; _Dp = std::_Optional_base<int, true, true>]: Assertion 'this->_M_is_engaged()' failed. Aborted (core dumped) It's been there since r248099 more than four years ago. Just compile with -D_GLIBCXX_ASSERTIONS