Boost logo

Boost :

Subject: Re: [boost] [histogram] review part 2 (implementation)
From: degski (degski_at_[hidden])
Date: 2018-09-26 09:40:13


On Wed, 26 Sep 2018 at 12:04, Hans Dembinski <hans.dembinski_at_[hidden]>
wrote:

>
> On 26. Sep 2018, at 10:41, degski <degski_at_[hidden]> wrote:
>
> On Wed, 26 Sep 2018 at 11:17, Hans Dembinski via Boost <
> boost_at_[hidden]> wrote:
>
>> Ok, no calling of destructors.
>>
>
> You should, iff you use placement new to construct an object in
> uninitialized memory, that's what Steven started with saying.
>
>
> Right, I got this now. When you have a union type with non-trivial bounded
> types you are also supposed to call the destructor manually when you switch
> types, and there it makes sense. My mistake was to believe that calling the
> destructor manually is like calling any other function. Now it is clear.
>

No no, something Steven said just before his other remark, "destructors
are special functions". Always pay attention to what Steven says, in a very
literal sense, except the "Ad Majorem Gloriam Dei", ignore that.

degski

-- 
*“If something cannot go on forever, it will stop" - Herbert Stein*

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk