Boost logo

Boost :

Subject: Re: [boost] [review][variant2] visit needs better user documentation
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2019-04-06 15:20:24


AMDG

On 4/6/19 9:01 AM, Larry Evans via Boost wrote:
> <snip>
> I only drew that conclusion because the number of args seems the only
> difference between the test that compiles OK and the one that doesn't.
> The code was copy&pasted from:
>
>
> https://github.com/pdimov/variant2/blob/develop/test/variant_visit.cpp#L105
>
> and the function object there only accepts `int` as it's first
> argument.  So, does that compile because any of the
> alternative types can be converted to `int`?
>

Yes.

> Hmmm.  Changed the all types of the lamba args to auto and
> it still fails to compile :(  Why is that?
>

The error is different, though. It fails because
the function body doesn't compile with every
combination of types.

In Christ,
Steven Watanabe


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