C++ Logo

SG20

Advanced search

Subject: Re: A draft paper to fix the range-based for loop to make it teachable
From: Peter C++ (peter.cpp_at_[hidden])
Date: 2020-11-11 11:58:43


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.

Regards
Peter

sent from a mobile device so please excuse strange words due to autocorrection.
Peter Sommerlad
peter.cpp_at_[hidden]
+41-79-432 23 32

> On 10 Nov 2020, at 20:56, Arthur O'Dwyer via SG20 <sg20_at_[hidden]> wrote:
>
>> On Tue, Nov 10, 2020 at 10:50 AM Nicolai Josuttis <nico_at_[hidden]> wrote:
>> Am 10.11.2020 um 15:51 schrieb Arthur O'Dwyer:



SG20 list run by sg20-owner@lists.isocpp.org

Older Archives on Google Groups