5
4

1 回答 1

2

It's a known bug. As @Casey found out, originally g++-4.4 did not support any relational operations on strongly-typed enums. For equality, this was fixed in version 4.4.1, but the fix for all other relations such as < and > only made it into 4.5.1 and above.

This is the original bug thread on the gcc bugzilla: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064

于 2013-07-19T16:58:24.743 回答