- Title
- Order of destruction of local automatics of destructor
- Status
- tc1
- Section
- 11.4.7 [class.dtor]
- Submitter
- Gerhard Menzl
Created on 2000-01-07.00:00:00 last changed 284 months ago
Messages
Date: 2000-10-15.00:00:00
Proposed resolution (10/00): In 11.4.7 [class.dtor] paragraph 6, change
A destructor for class X calls the destructors for
X 's direct members, ...
to
After executing the body of the destructor and destroying any
automatic objects allocated within the body, a destructor for class
X calls the destructors for X 's direct members, ...
Date: 2003-04-25.00:00:00
The Standard is not clear whether automatic objects in a destructor
are destroyed before or after the destruction of the class's base and
member subobjects. That is, given which will be destroyed first, x or y ?
struct S { ~S(); };
struct T {
S x;
~T() {
S y;
};
};
| 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: ready -> dr |
| 2000-05-21 00:00:00 | admin | set | messages: + msg315 |
| 2000-05-21 00:00:00 | admin | set | status: open -> ready |
| 2000-01-07 00:00:00 | admin | create | |