Boost logo

Boost :

From: E. Gladyshev (egladysh_at_[hidden])
Date: 2003-10-07 04:17:20


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

[...]
> In short, then, there's no theoretical reason to treat T1 specially, but
> it seemed to me a good compromise. Indeed, the optimization is usable
> even in generic contexts, e.g.:
>
> template <typename U1, ..., typename UN>
> class my_class
> {
> variant< boost::empty, U1, ..., UN > var_;
> };
>
> or if using a MPL-compatible typesequence:
>
> template <typename Types>
> class my_class
> {
> variant<
> typename mpl::push_front< Types, boost::empty >::type
> > var_;
> };

It is not a good solution. Should my_class wrapper duplicate
all variant interfaces?

Eugene

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk