...
This commit is contained in:
parent
d6ff78d407
commit
47b2dbe7a1
@ -17,14 +17,17 @@ namespace traits
|
|||||||
{
|
{
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
concept fsm_event_c = std::is_default_constructible_v<T> && std::is_move_constructible_v<T> && std::movable<T>;
|
concept fsm_event_c =
|
||||||
|
std::is_default_constructible_v<T> && std::is_move_constructible_v<T> && std::movable<T> && requires {
|
||||||
|
{ T::ID } -> std::same_as<const std::string_view>; // static constant member of event identificator
|
||||||
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
concept fsm_state_c =
|
concept fsm_state_c =
|
||||||
std::is_default_constructible_v<T> && std::is_move_constructible_v<T> && std::movable<T> && requires {
|
std::is_default_constructible_v<T> && std::is_move_constructible_v<T> && std::movable<T> && requires {
|
||||||
[]<mcc::traits::pair_holder_c PHT>(std::type_identity<PHT>) {}(T::transition_t);
|
[]<mcc::traits::pair_holder_c PHT>(std::type_identity<PHT>) {}(T::transition_t);
|
||||||
|
|
||||||
{ T::name } -> std::same_as<const std::string_view>; // static constant of state name
|
{ T::ID } -> std::same_as<const std::string_view>; // static constant member of state identificator
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace traits
|
} // namespace traits
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user