From 6b9dd86b401bf7f57eadbb99891563abf8caf711 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Sat, 13 Jun 2026 11:35:07 +0100 Subject: [PATCH] clang-format changes --- include/etl/type_list.h | 30 ++++++++++++------------------ test/test_type_list.cpp | 26 +++++++++++++------------- 2 files changed, 25 insertions(+), 31 deletions(-) diff --git a/include/etl/type_list.h b/include/etl/type_list.h index 21d6b587..af635574 100644 --- a/include/etl/type_list.h +++ b/include/etl/type_list.h @@ -971,27 +971,26 @@ namespace etl { }; -#if ETL_USING_CPP17 + #if ETL_USING_CPP17 template inline constexpr bool type_list_in_all_lists_v = type_list_in_all_lists::value; -#endif + #endif //***************************************************************************** /// Checks if a type T is present in at least one of the provided type_lists. /// Returns etl::true_type if T is in any list, otherwise etl::false_type. //***************************************************************************** template - struct type_list_in_any_list - : etl::false_type + struct type_list_in_any_list : etl::false_type { }; // Recursive case: Check the first list using your helper. template struct type_list_in_any_list - : etl::conditional::value, - etl::true_type, - type_list_in_any_list>::type {}; + : etl::conditional::value, etl::true_type, type_list_in_any_list>::type + { + }; // Specialisation if no lists provided. template @@ -999,10 +998,10 @@ namespace etl { }; -#if ETL_USING_CPP17 + #if ETL_USING_CPP17 template inline constexpr bool type_list_in_any_list_v = type_list_in_any_list::value; -#endif + #endif //***************************************************************************** /// Checks if a type T is present in none provided type_lists. @@ -1011,10 +1010,10 @@ namespace etl template using type_list_in_no_lists = etl::bool_constant::value>; -#if ETL_USING_CPP17 + #if ETL_USING_CPP17 template inline constexpr bool type_list_in_no_lists_v = type_list_in_no_lists::value; -#endif + #endif //***************************************************************************** namespace private_type_list @@ -1039,9 +1038,7 @@ namespace etl static constexpr bool head_is_not_in_other_lists = etl::type_list_in_no_lists::value; // Append Head to the result if it's NOT in any of the other lists. - using accumulated = etl::conditional_t, - TAccumulatedResult>; + using accumulated = etl::conditional_t, TAccumulatedResult>; public: @@ -1132,9 +1129,7 @@ namespace etl static constexpr bool head_is_in_all_lists = etl::type_list_in_all_lists::value; // Append Head to the result if it's in all lists AND not already added. - using accumulated = etl::conditional_t, - TAccumulatedResult>; + using accumulated = etl::conditional_t, TAccumulatedResult>; public: @@ -1215,4 +1210,3 @@ namespace etl #endif #endif - diff --git a/test/test_type_list.cpp b/test/test_type_list.cpp index e34205ac..c92f7db0 100644 --- a/test/test_type_list.cpp +++ b/test/test_type_list.cpp @@ -147,7 +147,7 @@ namespace using index_sequence = etl::index_sequence<0, 2>; - CHECK_TRUE((std::is_same < etl::type_list_select_from_index_sequence ::type, t2> ::value)); + CHECK_TRUE((std::is_same< etl::type_list_select_from_index_sequence::type, t2>::value)); CHECK_TRUE((std::is_same, t2>::value)); } @@ -167,11 +167,11 @@ namespace TEST(test_type_list_cat) { typedef etl::type_list t1; - typedef etl::type_list t2; - typedef etl::type_list<> t3; + typedef etl::type_list t2; + typedef etl::type_list<> t3; typedef etl::type_list t_cat1; - typedef etl::type_list t_cat2; + typedef etl::type_list t_cat2; CHECK_TRUE((std::is_same::type, t_cat1>::value)); CHECK_TRUE((std::is_same::type, t_cat1>::value)); @@ -921,7 +921,7 @@ namespace using list3 = etl::type_list; using list4 = etl::type_list<>; -#if ETL_USING_CPP17 + #if ETL_USING_CPP17 constexpr bool type_list_in_all_lists0 = etl::type_list_in_all_lists_v; constexpr bool type_list_in_all_lists1 = etl::type_list_in_all_lists_v; constexpr bool type_list_in_all_lists2 = etl::type_list_in_all_lists_v; @@ -929,7 +929,7 @@ namespace constexpr bool type_list_in_all_lists4 = etl::type_list_in_all_lists_v; constexpr bool type_list_in_all_lists5 = etl::type_list_in_all_lists_v; constexpr bool type_list_in_all_lists6 = etl::type_list_in_all_lists_v; -#else + #else constexpr bool type_list_in_all_lists0 = etl::type_list_in_all_lists::value; constexpr bool type_list_in_all_lists1 = etl::type_list_in_all_lists::value; constexpr bool type_list_in_all_lists2 = etl::type_list_in_all_lists::value; @@ -937,7 +937,7 @@ namespace constexpr bool type_list_in_all_lists4 = etl::type_list_in_all_lists::value; constexpr bool type_list_in_all_lists5 = etl::type_list_in_all_lists::value; constexpr bool type_list_in_all_lists6 = etl::type_list_in_all_lists::value; -#endif + #endif CHECK_FALSE(type_list_in_all_lists0); CHECK_TRUE(type_list_in_all_lists1); @@ -956,7 +956,7 @@ namespace using list3 = etl::type_list; using list4 = etl::type_list<>; -#if ETL_USING_CPP17 + #if ETL_USING_CPP17 constexpr bool type_list_in_any_list0 = etl::type_list_in_any_list_v; constexpr bool type_list_in_any_list1 = etl::type_list_in_any_list_v; constexpr bool type_list_in_any_list2 = etl::type_list_in_any_list_v; @@ -964,7 +964,7 @@ namespace constexpr bool type_list_in_any_list4 = etl::type_list_in_any_list_v; constexpr bool type_list_in_any_list5 = etl::type_list_in_any_list_v; constexpr bool type_list_in_any_list6 = etl::type_list_in_any_list_v; -#else + #else constexpr bool type_list_in_any_list0 = etl::type_list_in_any_list::value; constexpr bool type_list_in_any_list1 = etl::type_list_in_any_list::value; constexpr bool type_list_in_any_list2 = etl::type_list_in_any_list::value; @@ -972,7 +972,7 @@ namespace constexpr bool type_list_in_any_list4 = etl::type_list_in_any_list::value; constexpr bool type_list_in_any_list5 = etl::type_list_in_any_list::value; constexpr bool type_list_in_any_list6 = etl::type_list_in_any_list::value; -#endif + #endif CHECK_FALSE(type_list_in_any_list0); CHECK_TRUE(type_list_in_any_list1); @@ -991,7 +991,7 @@ namespace using list3 = etl::type_list; using list4 = etl::type_list<>; -#if ETL_USING_CPP17 + #if ETL_USING_CPP17 constexpr bool type_list_in_no_lists0 = etl::type_list_in_no_lists_v; constexpr bool type_list_in_no_lists1 = etl::type_list_in_no_lists_v; constexpr bool type_list_in_no_lists2 = etl::type_list_in_no_lists_v; @@ -999,7 +999,7 @@ namespace constexpr bool type_list_in_no_lists4 = etl::type_list_in_no_lists_v; constexpr bool type_list_in_no_lists5 = etl::type_list_in_no_lists_v; constexpr bool type_list_in_no_lists6 = etl::type_list_in_no_lists_v; -#else + #else constexpr bool type_list_in_no_lists0 = etl::type_list_in_no_lists::value; constexpr bool type_list_in_no_lists1 = etl::type_list_in_no_lists::value; constexpr bool type_list_in_no_lists2 = etl::type_list_in_no_lists::value; @@ -1007,7 +1007,7 @@ namespace constexpr bool type_list_in_no_lists4 = etl::type_list_in_no_lists::value; constexpr bool type_list_in_no_lists5 = etl::type_list_in_no_lists::value; constexpr bool type_list_in_no_lists6 = etl::type_list_in_no_lists::value; -#endif + #endif CHECK_TRUE(type_list_in_no_lists0); CHECK_FALSE(type_list_in_no_lists1);