C++ Logo

STD-DISCUSSION

Advanced search

Subject: Re: DestructorConstructor - a class destructor with parameter
From: Thiago Macieira (thiago_at_[hidden])
Date: 2021-02-10 16:02:42


On Wednesday, 10 February 2021 13:52:07 PST Maciej Polanski via Std-Discussion
wrote:
> I would like to present a (revolutionary?) concept of
> "DestructorConstructor", a class destructor with parameter -
> uninitialized object. Such destructor and constructor in one, while
> destructing its (own) object, moves data to new (parameter) object with
> cost of "C" styled "memcpy".
> I've been thinking about this concept for some time. I have trouble
> completing it, but I think it is sufficiently valuable to present it to
> community... even if only to be shown I am a moron

See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4034.pdf and
other proposals for "destructive move".

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DPG Cloud Engineering

STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups