From: Brock Peabody (brock.peabody_at_[hidden])
Date: 2003-10-08 18:52:57
> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]]
> On Behalf Of E. Gladyshev
> Good summary. I would prefer the second option.
> I think it should be possible to implement basic
> guarantees without the backup heap.
> The requirement says that variant should
> contain *a* value, so why do we need
> a backup heap. If we don't need a backup heap
> we don't have an issues with the first-type switch.
I may be wrong, but I think they had already determined that there was no
way to get the basic guarantee for classes without no-throw copy
constructors unless they used the backup heap. I bet they would be thrilled
if you could prove them wrong :)
> > My personal preference would be for (3). I'd take the performance
> > (the double allocation?) to get the strong guarantee - just do the right
> > thing you know.
> I agree with you in general, but IMO variant is a very basic type
> that should be useable in application where performance is important.
Yeah, you (and Dave) are certainly right about this. I was just wondering
if some day it might be common to specify exception guarantee level via
policy. I personally can't think of any places where I would care enough to
change the default, but it seemed like an interesting idea.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk