Subject: Re: [boost] [Variant] C++11 variadic template implementation
From: Larry Evans (cppljevans_at_[hidden])
Date: 2012-04-15 15:06:57
On 04/15/12 08:02, paul Fultz wrote:
> ----- Original Message -----
>> From: Mathias Gaunard <mathias.gaunard_at_[hidden]>
>> 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:
IIUC, something similar was proposed earlier; however, a preprocessor
generated switch statement was deemed faster:
However, maybe compiler's have improved since then.