Boost logo

Boost :

Subject: Re: [boost] [variant] Warning: variadic templates in boost::variant
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2013-12-10 12:32:11

On Tue, Dec 10, 2013 at 5:54 AM, Andrey Semashev

> I think that case would better be handled by variant<blank>. I.e. you
> can replace void return types with blank and the rest of the code can
> be left intact.

While that is the current workaround, I look at it as exactly that -- a
work-around. It just seems very arbitrary to me and only makes it so that
people have to special-case for a logical variant<> in metaprogrammed code.
As Peter Dimov also pointed out, variant<> seems to be just as valid as a
union {}, and I think most people would expect it to work pretty much the
same way. I also don't think we'd lose anything by simply supporting it and
the implementation would be trivial.

-Matt Calabrese

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