Boost logo

Boost :

Subject: Re: [boost] Variant2 review
From: Gavin Lambert (boost_at_[hidden])
Date: 2019-04-08 02:07:32


On 8/04/2019 13:53, Peter Dimov wrote:
> Gavin Lambert wrote:
>> Especially when something as simple as accidentally omitting
>> "noexcept" can cause a significant behavioural and storage size
>> change, it's great to be able to tell the compiler that this was
>> unintended.
>
> This is, by the way, already the case with std::vector<X>. It will
> silently fall back to using the copy constructor if you forget noexcept
> on the move constructor of X. See f.ex. https://godbolt.org/z/gv1fN5

Just because it's in the Standard doesn't mean that (I think) it's a
good design choice. ;)


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