Subject: Re: [boost] [variant] Warning: variadic templates in boost::variant
From: Larry Evans (cppljevans_at_[hidden])
Date: 2013-12-09 12:31:48
On 12/09/13 08:52, Steven Watanabe wrote:
[snip]> variant<> doesn't
> really make sense, because it's impossible to satisfy
> this invariant.
I'm not as sure variant<> doesn't make some sense.
tuple<> makes sense, at least according to:
and variant<> is a "dual" to tuple:
Also the following:
The coproduct indexed by the empty set
(that is, an empty coproduct)
is the same as an initial object in C.
where C is some category and "coproduct", IIUC, is what
variant is (the Coproduct page mentions it at
a "disjoint union of sets").
Hence, at least the Coproduct page sees some merit
in defining an "empty coproduct" or variant<>.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk