From 47b2dbe7a1a2249bc5cfd05b43015c3c62005a37 Mon Sep 17 00:00:00 2001 From: "Timur A. Fatkhullin" Date: Thu, 29 May 2025 00:06:37 +0300 Subject: [PATCH] ... --- cxx/mcc_fsm.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cxx/mcc_fsm.h b/cxx/mcc_fsm.h index 0add90f..a11080f 100644 --- a/cxx/mcc_fsm.h +++ b/cxx/mcc_fsm.h @@ -17,14 +17,17 @@ namespace traits { template -concept fsm_event_c = std::is_default_constructible_v && std::is_move_constructible_v && std::movable; +concept fsm_event_c = + std::is_default_constructible_v && std::is_move_constructible_v && std::movable && requires { + { T::ID } -> std::same_as; // static constant member of event identificator + }; template concept fsm_state_c = std::is_default_constructible_v && std::is_move_constructible_v && std::movable && requires { [](std::type_identity) {}(T::transition_t); - { T::name } -> std::same_as; // static constant of state name + { T::ID } -> std::same_as; // static constant member of state identificator }; } // namespace traits