|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-11-15 10:45:25
David Abrahams wrote:
> "Peter Dimov" <pdimov_at_[hidden]> writes:
>
>>>> Or variant_from_sequence<mpl-seq>::type?
>>>
>>> OK, sure.
>>
>> I take it back. The only correct interface is variant<mpl-seq>,
>> without the variable-length enhancement.
>
> I'm confused about what you mean. Isn't that the one we already have?
We have
variant<T1, T2, ..., Tn>
and
variant<mpl-seq>
There are two problems with it. First, there is a collision when n == 1.
Second, if I write
template<class Seq> void f( variant<Seq> const & v );
my function will not match all variants. I think that the correct but
painful thing to do is to just drop the convenience T1..Tn form.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk