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