$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Douglas Gregor (gregod_at_[hidden])
Date: 2003-10-21 14:29:11
On Tuesday 21 October 2003 03:09 pm, Tom wrote:
> It appears that there is a new variant library (boost::variant), but that
> it has been delayed.
> Also, there is the old boost.any library.
> And CUJ has a simple, ref-counted one here
> http://www.cuj.com/documents/s=8034/cuj0010cacciola/cacciola.htm.
> Also, CUJ has an article about boost::dynamic_any.
>
> Which should I use?
> I want to use one of the boost libraries, but I would like something small
> - meaning it won't addmuch to the size of my executable. Most boost
> libraries I can't use because they are too big (due to dependencies I
> assume).
Well, it depends on your needs. Is the set of types that might go into the
variant known at compile time? If so, use boost::variant. If the set of types
is not known at compile time, you can use boost::any or dynamic_any (the
latter is not yet a Boost library, and is still in development).
Doug