Subject: Re: [boost] [variant] Opinion on boost::safe_get<> and default boost::get<> behavior
From: Nevin Liber (nevin_at_[hidden])
Date: 2014-12-10 18:22:17
On 10 December 2014 at 17:04, Olaf van der Spek <ml_at_[hidden]> wrote:
> Compilers don't disallow if (0) and I think this construct could occur
> in (generic) code. Could the same be true for the variant case?
> I.e., is it always a bug?
We'll find out if we harden up get (which I also +1, BTW). :-)
If someone really intends to take advantage of this, they can always
rewrite their code to first check the type list. I suspect the number of
people who deliberately use this feature to be indistinguishable from zero.
-- Nevin ":-)" Liber <mailto:nevin_at_[hidden]> (847) 691-1404