Boost logo

Boost :

From: E. Gladyshev (egladysh_at_[hidden])
Date: 2003-10-06 12:40:44

--- Eric Friedman <ebf_at_[hidden]> wrote:

> > Does variant have storage allocation policies?
> > It doesn't seem to have it.
> No, it doesn't. In general, storage is on the stack.

Sorry it is not completely clear to me.

If I say:

struct my_type

typedef boost::variant< my_type > my_v;
std::vector< my_v, my_allocator<my_v> > v;

   my_type t;
   v.push_back( t );

How does the my_type variable gets allocated when it is transferred
to the variant?


Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

Boost list run by bdawes at, gregod at, cpdaniel at, john at