9 Jan
2015
9 Jan
'15
10:54 p.m.
On 2015-01-09 19:35, Matt Calabrese wrote:
You seem to be not getting that discriminated_union and variant each are used in different scenarios.
One quick scenario for where you want a variant is:
Why do you want a variant here? Can't you define an apply() for discriminated_union that does exactly what you want? Why do you need a different type? More specifically, why do you need a type for which match(v, [](A a){...}, [](B b){...} ) randomly breaks in generic code?