Add static assert on bt::action result type
This commit is contained in:
parent
283bc9efe5
commit
c68418e868
1 changed files with 2 additions and 2 deletions
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
#include <psemek/bt/node.hpp>
|
||||
|
||||
#include <optional>
|
||||
|
||||
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<std::result_of_t<ActionFn(Time, Args...)>, void>, "bt::action result type must be void");
|
||||
|
||||
action_node(ActionFn && action_fn)
|
||||
: action_fn_(std::move(action_fn))
|
||||
{}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue