[Bug c++/101442] Destructor not called for a temporary object, if it's bound to a ref member of an object subject to NRVO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101442 Richard Biener changed: What|Removed |Added Last reconfirmed||2021-07-14 Version|unknown
[Bug c++/101442] Destructor not called for a temporary object, if it's bound to a ref member of an object subject to NRVO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101442 --- Comment #1 from Egor --- Example is provided below. It prints `A()` and nothing else. I expected it to also pring `~A()`. ``` #include struct A { A() {std::cout << "A()\n";} A(const A &) = delete; A &operator=(const A &) = del