Boost logo

Boost :

Subject: Re: [boost] [variant] match()
From: Peter Dimov (lists_at_[hidden])
Date: 2015-01-07 16:28:29


pfultz2 (Paul) wrote:

> I use syntax like this:
>
> case_<void>(v)(
> [](A & a){ cout << "it's a A!"; }
> [](B & b){ cout << "oh, a B!"; }
> [](C & c){ cout << "ah yes, a C!"; }
> [](auto & d){ cout << "a default!"; }
> );

Shouldn't it be switch_ instead of case_?


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