http://llvm.org/bugs/show_bug.cgi?id=20021
Bug ID: 20021
Summary: static_assert rejected in anonymous structs/unions
Product: clang
Version: 3.4
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Clang rejects static_assert inside of anonymous structs:
struct blah
{
struct
{
int x;
static_assert(true, "huh?"); // Error
};
};
int main(int argc, const char * argv[])
{
blah b;
b.x = 5;
return b.x;
}
error: anonymous struct can only contain non-static data members
This should compile without issue.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs