From 682b1e7011c8cd75f988e85eb9be878539f24216 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Sun, 25 Jan 2026 11:09:59 +0100 Subject: [PATCH] Added type_list definitions for nth_type and observer --- include/etl/nth_type.h | 8 +++++--- include/etl/observer.h | 6 ++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/include/etl/nth_type.h b/include/etl/nth_type.h index a38a25f5..82e58ef4 100644 --- a/include/etl/nth_type.h +++ b/include/etl/nth_type.h @@ -58,14 +58,16 @@ namespace etl { ETL_STATIC_ASSERT(Index < sizeof...(TTypes), "etl::nth_type index 'Index' out of bounds"); - using type = typename private_nth_type::nth_type_helper::type; + using type = typename private_nth_type::nth_type_helper::type; + using type_list = etl::type_list; }; //*********************************** template - struct nth_type> : public nth_type + struct nth_type> { - using typename nth_type::type; + using type = typename nth_type::type; + using type_list = typename nth_type::type_list; }; //*********************************** diff --git a/include/etl/observer.h b/include/etl/observer.h index 133f8392..d722262b 100644 --- a/include/etl/observer.h +++ b/include/etl/observer.h @@ -309,6 +309,7 @@ namespace etl using observer::notification; using observer::notification; + using type_list = etl::type_list; }; //***************************************************************** @@ -323,6 +324,8 @@ namespace etl virtual ~observer() = default; virtual void notification(T1) = 0; + + using type_list = etl::type_list; }; //***************************************************************** @@ -337,6 +340,8 @@ namespace etl virtual ~observer() = default; virtual void notification() = 0; + + using type_list = etl::type_list<>; }; //***************************************************************** @@ -350,6 +355,7 @@ namespace etl public: using observer::notification; + using type_list = etl::type_list; }; #else