|
Boost : |
From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2006-12-20 02:39:17
"Joel de Guzman" <joel_at_[hidden]> wrote in message
news:emag2s$6tk$1_at_sea.gmane.org...
>>> You obviously prefer variant, which is perfectly ok.
>>
>> I am not sure where I gave this impression.
>
> Here:
>
> "So my concluding is ... If I keep the values in vectors of
> variant anyway I obviously prefer variant based version."...
What I meant is:
Let's say you have a
class Record {
typedef boost::variant<...> field_value_t;
std::vector<field_value_t> m_fields;
};
than in output function implementation I won;t use fusion, I will use my
existing vector of variants.
But if I need to do the job on a fly, like here:
int index;
float balance;
Data d;
Time t;
info merchant;
output_csv( index, balance, merchant, d, t );
...
int index;
float amount;
Data d;
Time t;
location branch;
output_csv( index, branch, amount, d, t );
I would build output_csv implementation based on fusion.
Gennadiy
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk