https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100322
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #2) > If you write it like this you get good codegen: I think I messed up my testing, and it doesn't help. GCC always chooses the synthesized operator> instead of the intended one, so always produces poor code.