3 ms·
It is surprising for a c++ programmer; the equivalent: auto _ = Foo{}; would leave the object alive till the end of scope. This is true for all RAII classe
by gpderetta 2y ago
It is surprising for a c++ programmer; the equivalent:
auto _ = Foo{};
would leave the object alive till the end of scope. This is true for all RAII classes. In C++26 the unnamed placeholder '_' is also special cased to allow redeclaration.