AMDG Joel de Guzman wrote:
Tobias Schwinger wrote:
(c0,c1,...,cN) being just another 'Case' rather than a 'Sequence'.
o..k... Hmm.. so how would the resulting case object for this expression look like:
case_c<1>(f1), case_c<2>(f2)
?
template< class SeqCases > struct sequenced_case { <snip>
Sounds good to me! I like it. So, this involves the variation where a case has an MPL sequence of labels. I knew there's something in that that I like. Intuition, I guess. That is also why I use the name case_ regardless of number. A compound case is just another case anyway. Does not matter how many labels it serves.
Not sure how, implementation-wise, this works for Steven. Steven? If this pans out, I'll refine the concept one more time.
It's trivial to implement:
#define BOOST_SWITCH_CASE(z, n, data)\
case mpl::at_c