C++ Logo


Advanced search

Re: [std-proposals] Rust vs C/C++ vs C++ Superset

From: Christof Meerwald <cmeerw_at_[hidden]>
Date: Wed, 28 Sep 2022 18:50:03 +0200
On Wed, Sep 28, 2022 at 12:29:22PM -0400, Phil Bouchard via Std-Proposals wrote:
> Yeah I agree with that, in a way to make C++ stricter, safer and simpler. I
> would add also: "return of reference to local variables":
> int & foo()
> {
>     int i;
>     return i;
> }
> Apparently this issue is not even detected by Visual Studio C++ in 2022.

That's already addressed in C++23 by https://wg21.link/P2266R3 "Simpler
implicit move".


https://cmeerw.org                             sip:cmeerw at cmeerw.org
mailto:cmeerw at cmeerw.org                   xmpp:cmeerw at cmeerw.org

Received on 2022-09-28 16:50:08