|
Boost : |
Subject: Re: [boost] [variant] match()
From: pfultz2 (pfultz2_at_[hidden])
Date: 2015-01-07 16:54:30
> > 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_?
I used `case_` because I was wanting to mimic OCaml syntax, but `switch_`
might make more sense for C++.
Paul
-- View this message in context: http://boost.2283326.n4.nabble.com/variant-match-tp4670714p4670761.html Sent from the Boost - Dev mailing list archive at Nabble.com.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk