Boost logo

Boost :

From: E. Gladyshev (egladysh_at_[hidden])
Date: 2003-10-28 01:42:22


--- David Abrahams <dave_at_[hidden]> wrote:
[...]
> Umm. OK, I guess that one works for the basic guarantee, though it's
> weird because the heterogeneous assignment only gives the basic
> guarantee when it could give the strong guarantee at similar cost.

A policy? :)

[...]
>
> >
> > If the variant doesn't have any guarantees about
> > the storage location of the controlled object,
>
> ...like the stability of that location...

That's right.

>
> > it seems that it is possible to create a heap
> > copy of the *lhs* not *rhs* and try to allocate
> > *rhs* in-place. If it is true, it seems that
> > the current implementation is more efficient
> > in terms of memory fragmentation (create a temp. *lhs*
> > and if everything is fine, delete it).
>
> Oooh, now I understand. Actually that's clever. OK, sorry Eric; nice
> job!

Yeah, nice job!. I have been using variant
a lot recently. I am quite happy with that.
variant has so many neat applications
that I think it will become the next most
widely used run-time class after shared_ptr. :)
It is important to get it right.
My guess is that we are almost there.

It seems that Eric has an interesting idea
about having const_variant at the variant's core.
Don't know the details but I hope it won't change
the existing memory allocation/deallocation
strategy to the "worse".

Eugene

__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/


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