diff --git a/include/etl/closure.h b/include/etl/closure.h index 1e9b33ed..2c150ec3 100644 --- a/include/etl/closure.h +++ b/include/etl/closure.h @@ -33,6 +33,7 @@ SOFTWARE. #include "platform.h" #include "delegate.h" +#include "invoke.h" #include "tuple.h" #include "type_list.h" #include "utility.h" @@ -71,6 +72,9 @@ namespace etl using callback_type = TCallback; ///< The callback type to be invoked. using argument_types = etl::type_list; ///< The type list of arguments. + static_assert(etl::is_invocable_r::value, "Callback is not invocable with the specified arguments"); + static_assert(etl::is_copy_constructible::value, "Callback type must be copy constructible"); + //********************************************************************* /// Construct a closure with a callback and its arguments. /// \param f The callback to be invoked.