C++ Logo


Advanced search

[std-proposals] Class Instance Re-Use/Re-Init

From: Greg McPherran <GMcPherran_at_[hidden]>
Date: Sun, 14 Aug 2022 16:54:34 +0000
I propose a ctor-like re-use/re-init special function that supports
re-use of objects without any memory operations (new/delete). An analogy
that I use is the reset() function of unique_ptr. However, my suggestion
goes beyond that such that this re-use capability is a ctor-like
once-and-done special function that is not available as a normal
function - just as the ctor is not available as a normal function once
the instance has been created.

Thank You for Consideration,
Greg McPherran

Received on 2022-08-14 16:54:39