14 Jul
2015
14 Jul
'15
6:17 p.m.
On 07/14/2015 01:03 PM, Peter Dimov wrote:
Larry Evans wrote:
What about variant<>, or is that disallowed? If it is disallowed, then tuple<> should, I guess, also be disallowed.
variant
has N(T1)+N(T2)+...+N(Tn) valid values, whereas tuple has N(T1)*N(T2)*...*N(Tn) valid values, where N(T) is the number of valid values T has. It follows that variant<> has zero valid values, whereas tuple<> has one.
Thanks Peter. To be explicit: tuple<> t0; would be allowed, but: variant<> v0; wouldn't compile because there are "zero valid values" in a variant<>?