#
An annotation may be applied to a base-specifier or to any declaration of a type, type alias, variable, function, namespace, enumerator, or non-static data member.
2
#
Let E be the expression std​::​meta​::​reflect_constant(constant-expression).
E shall be a constant expression; the result of E is the underlying constant of the annotation.
Substituting into an annotation is not in the immediate context.
[Example 1: 
[[=1] void f(); [[=2, =3, =2] void g(); void g [[=4, =2] (); f has one annotation and g has five annotations.
These can be queried with metafunctions such as std​::​​meta​::​​annotations_of ([meta.reflection.annotation]).
— end example]
[Example 2: template<class T> [[=T::type()] void f(T t); void f(int); void g() { f(0); / OK f('0'); / error, substituting into the annotation results in an invalid expression } — end example]

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant