State machine radio buttons

220 Views Asked by At

How can I implement radio buttons in boost meta state machine?
The problem is the amount of transitions grows quadratically, e.g. with 3 buttons the options are:

1 -> 2
1 -> 3
2 -> 1
2 -> 3
3 -> 1
3 -> 2

But with 4 buttons the options are:

1 -> 2
1 -> 3
1 -> 4
2 -> 1
2 -> 3
2 -> 4
3 -> 1
3 -> 2
3 -> 4
4 -> 1
4 -> 2
4 -> 3

Is there a way to do something like

{2, 3, 4} -> 1
{1, 3, 4} -> 2
{1, 2, 4} -> 3
{1, 2, 3} -> 4

in boost meta state machine?

0

There are 0 best solutions below