[Example 1: [[using CC: opt(1), debug]]// same as [[CC::opt(1), CC::debug]]void f(){}[[using CC: opt(1)]][[CC::debug]]// same as [[CC::opt(1)]] [[CC::debug]]void g(){}[[using CC: CC::opt(1)]]// error: cannot combine using and scoped attribute tokenvoid h(){} — end example]
If two consecutive left square brackets appear
where an attribute-specifier is not allowed, the program is ill-formed even
if the brackets match an alternative grammar production.
— end note]
[Example 2: int p[10];
void f(){int x =42, y[5];
int(p[[x]{return x; }()]); // error: invalid attribute on a nested declarator-id and// not a function-style cast of an element of p.
y[[]{return2; }()]=2; // error even though attributes are not allowed in this context.int i [[vendor::attr([[]])]]; // well-formed implementation-defined attribute.} — end example]