Boost logo

Boost Users :

Subject: Re: [Boost-users] boost any questions and praise
From: Alan Tennant (alan2here_at_[hidden])
Date: 2010-01-31 11:03:22


>
> Depending on exactly what you are trying to do, the Boost.Variant library
> may be more useful than Boost.Any.
>

I suppose it was a "wouldn't it be nifty if it could" not a need. My needs
are already met by boost::any and my question was quite precise so I guess
your answer is no. I presume you can't pass the .type to on of your own
templates either and expect the template to understand it as the type it
represents.

Variant seems functionally inferior to Any, the big'y being that you need to
know all the types in advance.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net