Skip to content

Commit 56758c0

Browse files
burblebeetkoeppe
authored andcommitted
CWG2886 Temporaries and trivial potentially-throwing special member functions
1 parent 7c74329 commit 56758c0

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

source/basic.tex

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4442,7 +4442,7 @@
44424442

44434443
\pnum
44444444
When an object of class type \tcode{X}
4445-
is passed to or returned from a function,
4445+
is passed to or returned from a potentially-evaluated function call,
44464446
if \tcode{X} has at least one eligible copy or move constructor\iref{special},
44474447
each such constructor is trivial,
44484448
and the destructor of \tcode{X} is either trivial or deleted,
@@ -4465,11 +4465,6 @@
44654465
\indextext{temporary!constructor for}%
44664466
\indextext{temporary!destructor for}%
44674467
\indextext{temporary!destruction of}%
4468-
When an implementation introduces a temporary object of a class that has a
4469-
non-trivial constructor\iref{class.default.ctor,class.copy.ctor},
4470-
it shall ensure that a constructor is called for the temporary object.
4471-
Similarly, the destructor shall be called for a temporary with a non-trivial
4472-
destructor\iref{class.dtor}.
44734468
Temporary objects are destroyed as the last step
44744469
in evaluating
44754470
the full-expression\iref{intro.execution}

0 commit comments

Comments
 (0)