Created on1998-10-17.00:00:00 last changed275 months ago
Proposed resolution (10/00):
Change the grammar in 9.2.9.5 [dcl.type.elab] to read
I can't find the answer to the following in the standard. Doesanybody have a reference?
The syntax for elaborated type specifier is
class foo<int> // foo is a templateOn the other hand, a friend declaration seems to require this production,
Anelaborated-type-specifier shall be used in afriend declaration for a class.*And in 13.7.5 [temp.friend] we find the example[Footnote: Theclass-key of theelaborated-type-specifier is required.—end footnote]
[Example: template<class T> class task; template<class T> task<T>* preempt(task<T>*); template<class T> class task { // ... friend void next_time(); friend void process(task<T>*); friend task<T>* preempt<T>(task<T>*); template<class C> friend int func(C); friend class task<int>; template<class P> friend class frd; // ... };Is there some special dispensation somewhere to allow the syntax in thiscontext? Is there something I've missed aboutelaborated-type-specifier?Is it just another bug in the standard?An additional problem was reported viacomp.std.c++: thegrammar does not allow the following example:
namespace A{ class B{}; }; namespace B{ class A{}; class C{friend class ::A::B; }; };
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2003-04-25 00:00:00 | admin | set | status: dr -> tc1 |
| 2000-11-18 00:00:00 | admin | set | status: review -> dr |
| 2000-05-21 00:00:00 | admin | set | status: drafting -> review |
| 1999-09-14 00:00:00 | admin | set | messages: +msg97 |
| 1999-09-14 00:00:00 | admin | set | status: open -> drafting |
| 1998-10-17 00:00:00 | admin | create | |