https://bugs.llvm.org/show_bug.cgi?id=47694
Bug ID: 47694
Summary: C++20 Designated Initializers - Nested initialization
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++2a
Assignee: unassignedclangb...@nondot.org
Reporter: c...@synopsys.com
CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk
Hi,
This code snippet is taken from P0329R4.
struct A
{
int x;
};
struct B
{
A a;
};
int main()
{
B b{.a.x = 0};
return 0;
}
GCC fails to compile this example, which should be invalid according to the
C++20 standard.
GCC error:
error: expected primary-expression before '.' token
13 | B b{.a.x = 0};
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs