[intro.execution] CWG2431: Destruction of a temp. object bound to a reference is not a full-expression? · Issue #2664 · cplusplus/draft (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
http://eel.is/c++draft/intro.execution#def:full-expression:
A full-expression is
— an invocation of a destructor generated at the end of the lifetime of an object other than a temporary object ([class.temporary]), or
Here is an example
void foo()
{
const auto& rk = Klass{};
Klass k;
// ...
// generated invocation k.~Klass()
is a full-expression
// generated invocation rk.~Klass()
is not a full-expression?
}
I think it is intended to be a full-expression, so the Standard should say something like
other than a temporary object whose lifetime was not extended