CWG Issue 2431 (original) (raw)
This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-04-13
2431. Full-expressions and temporaries bound to references
Section: 6.9 [basic.exec]Status: C++20Submitter: Andrey ErokhinDate: 2019-02-07
[Adopted as a DR at the November, 2019 meeting.]
According to 6.9 [basic.exec] paragraph 5,
A full-expression is
- ...
- an invocation of a destructor generated at the end of the lifetime of an object other than a temporary object (6.7.7 [class.temporary]), or
- ...
This definition excludes the destruction of temporaries that are bound to references from being treated as full-expressions. It is not clear whether this omission has observable effects or not. Seeeditorial issue 2664.
Proposed resolution (October, 2019):
Change 6.9 [basic.exec] bullet 5.5 as follows:
A full-expression is
- ...
- an invocation of a destructor generated at the end of the lifetime of an object other than a temporary object (6.7.7 [class.temporary]) whose lifetime has not been extended, or
- ...