Boost logo

Boost :

Subject: Re: [boost] Pimpl Again?
From: Vladimir Batov (Vladimir.Batov_at_[hidden])
Date: 2016-05-31 22:12:38


On 2016-06-01 11:57, Howard Hinnant wrote:
> On May 31, 2016, at 9:51 PM, Vladimir Batov
>>
>> From efficiency point of view the above is identical to
>>
>> Book::~Book() {}
>>
>> or compiler writers do more magic with "=default"? I like "=default"
>> as I feel it's cleaner language-wise. What weighty reason can I give
>> to a beginner to prefer "=default" over {}... apart from "I am older,
>> musclier and your boss" :-)
>
> That’s a good question. It doesn’t turn the destructor from
> non-trivial to trivial. It does not change the noexcept or constexpr
> status. The only thing it really does is say: I want default
> semantics here. Maintenance programmers should be more leery of
> adding superfluous stuff to your destructor.

Good point. Indeed, it's just too easy/tempting to stick something
between the braces. :-)


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