[LLVMbugs] [Bug 9333] New: scoped enum values can't be compared
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Feb 26 01:07:03 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=9333
Summary: scoped enum values can't be compared
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++0x
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: chris at bubblescope.net
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
The implementation of scoped enums appears incomplete. In particular, values of
scoped enums do not appear comparable. Consider the following code:
int main(void)
{
enum class scoped_enum { yes, no, maybe };
scoped_enum e = scoped_enum::yes;
e == scoped_enum::no;
}
I don't mind the feature being incomplete (assuming I'm correct this code
doesn't work), but it's a little annoying that __has_feature(cxx_strong_enums)
returns true, when the feature is basically not useful.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list