Boost logo

Boost :

Subject: Re: [boost] [variant] Warning: variadic templates in boost::variant
From: Peter Dimov (lists_at_[hidden])
Date: 2013-12-09 15:28:17


Steven Watanabe wrote:
> The difference between tuple<> and variant<> is that tuple<> has exactly
> one possible value, but variant<> has no possible values.

Not conceptually. tuple<X,Y> is struct { X x; Y y; }. variant<X,Y> is union
{ X x; Y y; }. tuple<> is struct {}. variant<> is union {}. All are valid.

It's not that important though. The current variant doesn't support this
case, so there's not much reason for the variadic one to do so. Sorry for
bringing it up.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk