- Title
- Should the enclosing class be an "associated class" too?
- Status
- tc1
- Section
- 6.5.4 [basic.lookup.argdep]
- Submitter
- John Spicer
Created on 1999-02-02.00:00:00 last changed 284 months ago
Messages
Date: 1999-10-15.00:00:00
Proposed Resolution (10/99):
Change the two referenced bullets to read:
(This proposal also addresses
Core issue 91.)
Date: 2022-11-20.07:54:16
Section
6.5.4 [basic.lookup.argdep]
includes the following:
Proposed Resolution (10/99):
Change the two referenced bullets to read:
Note that for a union, the enclosing class is an "associated class", but
for a class type the enclosing class is not an "associated class". This
results in some surprising behavior, as shown in the example below.
struct A {
union U {};
friend void f(U);
};
struct B {
struct S {};
friend void f(S);
};
int main() {
A::U u;
f(u); // okay: A is an associated class
B::S s;
f(s); // error: no matching f(), B is not an associated class
}
Certainly the enclosing class should also be an associated class for nested
class types, shouldn't it?
(This proposal also addresses
Core issue 91.)
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2003-04-25 00:00:00 | admin | set | status: dr -> tc1 |
| 2000-02-23 00:00:00 | admin | set | messages: + msg296 |
| 2000-02-23 00:00:00 | admin | set | status: review -> dr |
| 1999-02-02 00:00:00 | admin | create | |