https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102653
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This is the expected behaviour, and every C++ compiler will give the same
result.
In your second example there is an implicit conversion to int. Scoped enums
(aka enum classes) do not implicitly convert to int.