开发者

State machine radio buttons

开发者 https://www.devze.com 2023-04-13 01:11 出处:网络
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:

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 开发者_JS百科boost meta state machine?

0

精彩评论

暂无评论...
验证码 换一张
取 消