To chime in my 0.02 CHF:
The crux of dangling in many cases are member functions returning references (or pointers of views) If those functions would be lvalue-ref-qualified this dangling can not happen. If a rref-qualified overload should be present and what it should return (eg by value) is a different story. But the main problem is that neither the standard library nor the core language mended the hole in the type system that the ability to call unqualified members on temporaries left, even after those means have beef established in C++11.
sent from a mobile device so please excuse strange words due to autocorrection.
+41-79-432 23 32
On 10 Nov 2020, at 20:56, Arthur O'Dwyer via SG20 <email@example.com> wrote:
Am 10.11.2020 um 15:51 schrieb Arthur O'Dwyer: