Boost logo

Boost :

Subject: Re: [boost] [variant] Basic rvalue and C++11 features support
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2013-01-14 02:14:52


On Mon, Jan 14, 2013 at 11:09 AM, Antony Polukhin <antoshkka_at_[hidden]> wrote:
> 2013/1/13 Vicente J. Botet Escriba <vicente.botet_at_[hidden]>:
>>>
>> This would make less efficient the get operation. I would prefer to force
>> the boost::blank default construction.
>
> I see no big difference between "BOOST_ASSERT(p_);" and "if (p_) p_ =
> new T;" except default construction requirement for T.

The assert will be removed in release builds, so the difference
exists. Also, this makes get() a potential source of exceptions which
is a breaking change and counter-intuitive. +1 for not making such a
change.


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