https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87016
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to bobogu from comment #4) > I feel stupid, but I still don't understand how that can work in a constexpr > context when the current c++17 standard doesn't specify any constexpr > assignment operator. That's true, but the standard is broken. All implementations define the assignment operator as defaulted, and so the compiler makes it constexpr. In fact the p0602R3 proposal you linked to is relevant, because it would *require* implementations to define the operator as defaulted (in order to be trivial) and so the compiler is always going to make it constexpr for std::optional<int>. Anyway, I don't consider "I can use more things in constant expressions than the standard says" to be a bug.