An annotation may be applied
to a
base-specifier or
to a declaration
D of a
type,
type alias,
variable,
function,
namespace,
enumerator, or
non-static data member,
unless
- the host scope of X differs from its target scope or
- X is a non-defining friend declaration,
where
X is
- D′ if D is a function parameter declaration in
a function declarator ([dcl.fct]) of a function declaration D′ and
- D otherwise.