Created on 2022-11-18.00:00:00 last changed 24 months ago
Subclause 9.3.4.1 [dcl.meaning.general] paragraph 1 specifies:
... If the unqualified-id occurring in a declarator-id is a template-id, the declarator shall appear in the declaration of a template-declaration (13.7 [temp.decls]), explicit-specialization (13.9.4 [temp.expl.spec]), or explicit-instantiation (13.9.3 [temp.explicit]).
However, that is too restrictive and prevents befriending template specializations, for example:
template<typename> void f(); class A { friend void f<A>(); };
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-11-18 00:00:00 | admin | create |