C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Delete...why not a parameter by reference?!

From: Sebastian Wittmeier <wittmeier_at_[hidden]>
Date: Sat, 23 Aug 2025 15:53:03 +0200
I would like to have a lifetime model also built on objects (often) being member variables and the guarantee that the storing object outlives longer than the stored object. This combined with the function call hierarchy and scopes. -----Ursprüngliche Nachricht----- Von:Oliver Hunt via Std-Proposals <std-proposals_at_[hidden]> Examples where the entire lifetime and use of a function is bound essentially to a single lexical scope are _vastly_ easier to reason about. That’s why rust’s lifetime model, and the borrow checking, is derived from lexical scoping. It makes reasoning about object lifetime something that can be reasoned about locally.

Received on 2025-08-23 14:03:57