C++ Logo


Advanced search

Subject: Re: DestructorConstructor - a class destructor with parameter
From: Giuseppe D'Angelo (giuseppe.dangelo_at_[hidden])
Date: 2021-02-11 11:47:56


On 11/02/2021 18:25, Maciej Polanski via Std-Discussion wrote:
> It seems that having "bitcopies" constructor does not guarantee empty
> destructor, nor lack of side effects of destructing empty object. It had
> to be found by compiler during optimization.
> Correct me if I am wrong, but if I was a library programmer,  I wouldn't
> be able to find if I am allowed to memcpy of given class or not. Solely
> having "bitcopies" constructor is not enough.

See also P1144 and its algorithms , like relocate_at

> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1144r5.html#wording-relocate-at


Giuseppe D'Angelo | giuseppe.dangelo_at_[hidden] | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

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

Older Archives on Google Groups