Created on 2003-04-18.00:00:00 last changed 196 months ago
[Voted into WP at October 2004 meeting.]
Proposed Resolution (October 2003):
Remove 13.7.5 [temp.friend] paragraph 2:
A friend function declaration that is not a template declaration and in which the name of the friend is an unqualified template-id shall refer to a specialization of a function template declared in the nearest enclosing namespace scope. [Example:namespace N { template <class T> void f(T); void g(int); namespace M { template <class T> void h(T); template <class T> void i(T); struct A { friend void f<>(int); // ill-formed - N::f friend void h<>(int); // OK - M::h friend void g(int); // OK - new decl of M::g template <class T> void i(T); friend void i<>(int); // ill-formed - A::i }; } }--end example]
13.7.5 [temp.friend] paragraph 2 was overlooked when the changes for issue 166 were made.
The friend declaration of f<>(int) is now valid.
A friend function declaration that is not a template declaration and in which the name of the friend is an unqualified template-id shall refer to a specialization of a function template declared in the nearest enclosing namespace scope. [Example:namespace N { template <class T> void f(T); void g(int); namespace M { template <class T> void h(T); template <class T> void i(T); struct A { friend void f<>(int); // ill-formed - N::f friend void h<>(int); // OK - M::h friend void g(int); // OK - new decl of M::g template <class T> void i(T); friend void i<>(int); // ill-formed - A::i }; } }--end example]
History | |||
---|---|---|---|
Date | User | Action | Args |
2008-10-05 00:00:00 | admin | set | status: wp -> cd1 |
2005-05-01 00:00:00 | admin | set | status: dr -> wp |
2004-11-07 00:00:00 | admin | set | messages: + msg1099 |
2004-11-07 00:00:00 | admin | set | status: ready -> dr |
2004-04-09 00:00:00 | admin | set | status: review -> ready |
2003-11-15 00:00:00 | admin | set | messages: + msg929 |
2003-11-15 00:00:00 | admin | set | status: open -> review |
2003-04-18 00:00:00 | admin | create |