From db24fe97a812652ab07a76ebea8361779fb2d2e8 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Wed, 8 Apr 2026 23:21:41 +0100 Subject: [PATCH] Fixed C++03 compatibility # Conflicts: # include/etl/closure.h --- include/etl/closure.h | 4 ++++ 1 file changed, 4 insertions(+) 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.