https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91281
Bug ID: 91281 Summary: std::optional debug checks Product: gcc Version: 10.0 Status: UNCONFIRMED Keywords: diagnostic, easyhack Severity: enhancement Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: glisse at gcc dot gnu.org Target Milestone: --- std::optional::operator* has a precondition _M_engaged, but it is not checked, even in debug mode. It seems like a cheap and easy test to add.