Boost logo

Boost :

Subject: Re: [boost] boost::variant and "Current Approach: Temporary HeapBackup" vs "An Initial Solution: Double Storage"
From: Peter Foelsche (peter_foelsche_at_[hidden])
Date: 2009-09-30 20:24:02


"Peter Foelsche" <peter_foelsche_at_[hidden]> wrote in message
news:ha0lp0$jcu$1_at_ger.gmane.org...
>> If any of the variant's types have a no-throw default constructor,
>> then no heap backup is used, because variant can construct
>> an object of that type if an exception is thrown. In practice,
>> this means built-in types, or boost::blank.
>
>
> This means, my assumptions about exceptions safety of boost::variant may
> be wrong.
> Is this following code & assertion valid?
> I would like if I can assume this.

never mind -- exceptions safety seems to be guaranteed-- I just had a look
at

boost::detail::variant::backup_assigner


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