File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 3160
3160
An aggregate that is a class can also be initialized with a single
3161
3161
expression not enclosed in braces, as described in~\ref {dcl.init }.
3162
3162
3163
+ \pnum
3164
+ The destructor for each element of class type
3165
+ is potentially invoked\iref {class.dtor }
3166
+ from the context where the aggregate initialization occurs.
3167
+ \begin {note }
3168
+ This provision ensures that destructors can be called
3169
+ for fully-constructed subobjects
3170
+ in case an exception is thrown\iref {except.ctor }.
3171
+ \end {note }
3172
+
3163
3173
\pnum
3164
3174
An array of unknown bound initialized with a
3165
3175
brace-enclosed
Original file line number Diff line number Diff line change 1206
1206
\begin {note } An array of class type contains several subobjects for each of which
1207
1207
the destructor is invoked. \end {note }
1208
1208
A destructor can also be invoked explicitly. A destructor is \term {potentially invoked}
1209
- if it is invoked or as specified in~\ref {expr.new }, \ref {class.base. init },
1210
- and~\ref {except.throw }.
1209
+ if it is invoked or as specified in~\ref {expr.new }, \ref {dcl. init.aggr },
1210
+ \ref { class.base.init }, and~\ref {except.throw }.
1211
1211
A program is ill-formed if a destructor that is potentially invoked is deleted
1212
1212
or not accessible from the context of the invocation.
1213
1213
You can’t perform that action at this time.
0 commit comments