-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Reference (section label): [dcl.attr.annotation]
Issue description:
Consider the example
template<int> int x [[=1]];
template<int A> int y [[=A]];
static_assert(annotations_of(^^x<0>) == annotations_of(^^x<1>)); // #1
static_assert(annotations_of(^^y<0>) == annotations_of(^^y<1>)); // #2[dcl.attr.annotation] currently says that:
Each annotation produces a unique annotation.
Which suggests a grammatical uniqueness — that there is only one [[=1]] (and thus #1 holds) and nonsensically that there is only one [[=A]] (which would imply that #2 holds). We probably need to say something about how instantiation produces unique annotations as well, so that neither static_assert holds — which is important if we ever want to allow something like parent_of(annotations_of(^^x<0>)[0]) == ^^x<0>.
I don't know how to word that, where, but would probably help to include the simpler example in the wording:
template<int> int x [[=1]];
static_assert(annotations_of(^^x<0>) != annotations_of(^^x<1>)); // okfrederick-vs-ja
Metadata
Metadata
Assignees
Labels
No labels