|
Boost : |
Subject: Re: [boost] [Variant] C++11 variadic template implementation
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2012-04-15 10:26:14
On 15/04/12 15:41, Florian Goujeon wrote:
> On 04/15/2012 03:02 PM, paul Fultz wrote:
>> Do you have the code posted online somewhere?
>
> Yes I do:
> https://github.com/fgoujeon/scalpel/tree/master/src/scalpel/utility/variant
>
> This implementation is based on a fixed-size stack-based any container
> (any_container.hpp).
> I think it's annoying because it breaks the anti-aliasing rule. But I'll
> let you judge.
You use nested ifs, not as good as a switch.
Also, the special code to deal with visitors that return void seems
entirely unnecessary.
As for any_container.hpp, the clear_and_set stuff (which I suppose you
use in operator=) is very wrong. You're literally copying an object to a
different location and calling the destructor there.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk