Fixed C++03 compatibility

# Conflicts:
#	include/etl/closure.h
This commit is contained in:
John Wellbelove 2026-04-08 23:21:41 +01:00
parent 39172c281a
commit db24fe97a8

View File

@ -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<TArgs...>; ///< The type list of arguments.
static_assert(etl::is_invocable_r<TReturn, TCallback, TArgs...>::value, "Callback is not invocable with the specified arguments");
static_assert(etl::is_copy_constructible<TCallback>::value, "Callback type must be copy constructible");
//*********************************************************************
/// Construct a closure with a callback and its arguments.
/// \param f The callback to be invoked.