Boost logo

Boost :

From: Yitzhak Sapir (yitzhaks_at_[hidden])
Date: 2002-06-13 06:09:41

> -----Original Message-----
> From: Douglas Gregor [mailto:gregod_at_[hidden]]
> 1) Storage
> This policy basically collapses in on itself, because
> there are only two
> options to choose from, and everyone seems to agree that stack-based
> allocation is highly preferable. Plus, there are easy ways to
> simulate heap
> allocation using stack allocation (Andrei suggests putting a
> smart_ptr in the
> variant, and I suggest an 'incomplete' designator, both of
> which are more
> fine-grained and more obvious than writing a new policy).

I would still like to have a boost::any type class for limited infinite ranges of types. Using a smart_ptr<Class> does indeed model some sort of "any class that inherits from some base class". But I had built an "any iterator to some-predefined-T" type class, based on the way boost::any was implemented. How would you implement "any iterator to int" using a stack-based variant? Or the possibility of "any instantiation of template class T" (I am not sure I know if this is useful, though. The "any iterator" concept is something more specific that seems to be useful in several places that I've written, and which I later saw on the Wiki web page at one point.)

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