|
Boost Users : |
Subject: [Boost-users] Variant and Fusion
From: Matthias Vallentin (vallentin_at_[hidden])
Date: 2010-03-10 16:37:14
Hi,
there used to be a variant adapter for fusion sequences, but it has
been rightfully removed:
on Wed Dec 19 2007, Joel de Guzman <joel-AT-boost-consulting.com> wrote:
> I intend to remove the variant adapter from fusion. After thorough
> investigation, I think now that the move to make variant a
> fusion sequence is rather quirky. A variant will always
> have a size==1 regardless of the number of types it can contain
> and there's no way to know at compile time what it contains.
> Iterating over its types is simply wrong. All these imply that
> the variant is *not* a fusion sequence.
Let's say I have a recursive variant and would like to flatten the
variant to create some sort of heterogeneous sequence from it.
Particularly, I would like to chop the variant into multiple disjunct
Fusion sequences, each of which are handed to generic component that
operates with Fusion sequences. The above suggests that Fusion is not
the right tool. What would be a better approach to handle this problem?
Should I split the variant into smaller variants instead? What made
Fusion so attractive is the notion of tiers, i.e., light-weight views of
references to the actual data. Is there a variant equivalent of tiers?
Matthias
-- Matthias Vallentin vallentin_at_[hidden] http://www.icir.org/matthias
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net