From 06057b59ae0cec834924f8cbfc21792c7fb794e3 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Sat, 20 Dec 2025 09:39:50 +0000 Subject: [PATCH] Synchronised etl::invoke_result with that in the etl::inplace_function branch --- include/etl/invoke.h | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/include/etl/invoke.h b/include/etl/invoke.h index 3f86350c..efd0dc07 100644 --- a/include/etl/invoke.h +++ b/include/etl/invoke.h @@ -183,19 +183,34 @@ namespace etl //**************************************************************************** /// invoke_result - template - struct invoke_result; + template + struct invoke_result + { + using type = void; + }; + //******************************************* template struct invoke_result(), etl::declval()...))>, - TArgs...> + TArgs...> { using type = decltype(etl::invoke(etl::declval(), etl::declval()...)); }; + //******************************************* + // Specialization to allow `etl::type_list<...>` as the second template parameter. template - using invoke_result_t = typename invoke_result::type; + struct invoke_result(), etl::declval()...))>, + etl::type_list> + { + using type = decltype(etl::invoke(etl::declval(), etl::declval()...)); + }; + + //******************************************* + template + using invoke_result_t = typename invoke_result::type; //**************************************************************************** /// is_invocable