https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118647
--- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Arthur O'Dwyer from comment #11) > Personally I encourage libstdc++ to join libc++ in optimizing as if P3349 > were already the law of the land. You're free to say "no, we must not > perform that optimization until it is legal on paper"; but in that case, > you've got a wrong-codegen bug *today*, which (for logical consistency) you > should fix. No matter what, the correct optimization-gate here will *not* > branch on the noexceptness of `operator==` and `operator*`. It will get changed some time after P3349 is accepted. It won't get changed before then because I'm far too busy to deal with a missed optimization here. If for some reason P3349 isn't accepted, then I'll worry about whether or not this should be fixed for other reasons. But I'm not going to worry about that now.