From c68418e8683938bffcabd45d01fbef5b7e940dbe Mon Sep 17 00:00:00 2001 From: lisyarus Date: Thu, 30 May 2024 21:58:44 +0300 Subject: [PATCH] Add static assert on bt::action result type --- libs/bt/include/psemek/bt/action.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/bt/include/psemek/bt/action.hpp b/libs/bt/include/psemek/bt/action.hpp index 7cf6dedb..ff105bb3 100644 --- a/libs/bt/include/psemek/bt/action.hpp +++ b/libs/bt/include/psemek/bt/action.hpp @@ -2,8 +2,6 @@ #include -#include - namespace psemek::bt { @@ -19,6 +17,8 @@ namespace psemek::bt using typename node_type::finished; using typename node_type::status; + static_assert(std::is_same_v, void>, "bt::action result type must be void"); + action_node(ActionFn && action_fn) : action_fn_(std::move(action_fn)) {}