|
Boost : |
Subject: Re: [boost] [Variant] C++11 variadic template implementation
From: paul Fultz (pfultz2_at_[hidden])
Date: 2012-04-15 09:02:47
----- Original Message -----
> From: Mathias Gaunard <mathias.gaunard_at_[hidden]>
> To: boost_at_[hidden]
> Cc:
> Sent: Sunday, April 15, 2012 8:07 AM
> Subject: Re: [boost] [Variant] C++11 variadic template implementation
>
> On 15/04/12 11:57, Florian Goujeon wrote:
>> Hi Boosters,
>>
>> I'd like to know if anybody were working on a C++11 version (using
> variadic
>>
>> templates) of Boost.Variant.
>
> Variadic templates would not help at all with Boost.Variant.
>
>
>> I've written an implementation.
Do you have the code posted online somewhere?
>
> Did you find a magic way to make a switch statement from a template
> parameter pack?
Well you can expand the parameter pack to create a static array of
function pointers. This is how it is done in this implementation:
http://thenewcpp.wordpress.com/2012/02/15/variadic-templates-part-3-or-how-i-wrote-a-variant-class/
Thanks,
Paul Fultz II
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk