Boost logo

Boost :

From: Emil Dotchevski (emil_at_[hidden])
Date: 2008-03-27 17:33:27

The never-empty requirement for Boost Variant requires memory
allocation in general, in the implementation of operator=, as
discussed here:

The same page states that future implementations might use
policy-based design to specify custom allocator.

Assuming that it is desirable to allow for allocations to be
customized, wouldn't it be better to use the same technique as in the
custom allocator support in shared_ptr and in the version of
boost::function that Doug just committed to the SVN trunk?

In this case, the allocator wouldn't be provided as a policy to the
variant template itself, but would appear as template parameter of its
constructor and operator=.

Emil Dotchevski
Reverge Studios, Inc.

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