Boost logo

Boost :

Subject: Re: [boost] [variant] assign and access the assigned value simultaneously
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2014-03-18 22:32:42

On 14/03/2014 19:22, Quoth feverzsj:
> for common case:
> boost::variant<Val,...> var;
> var = val;
> Val& v = boost::get<Val>(var);

Why is that a common case? I would think that's an anti-pattern,
personally. (But then I haven't played with variants much, so perhaps
I'm missing something.)

Boost list run by bdawes at, gregod at, cpdaniel at, john at