1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-17 23:35:47 +00:00

[core] Replace seq<>/gens<> with std::index_sequence for code clarity

This commit is contained in:
J. Nick Koston
2025-11-15 12:04:02 -06:00
parent fb9e7028a0
commit b7f6013378

View File

@@ -19,10 +19,13 @@ namespace esphome {
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
// NOLINTNEXTLINE(readability-identifier-naming)
template<int...> struct ESPDEPRECATED("Use std::index_sequence instead. Removed in 2026.6.0", "2025.12.0") seq {};
// NOLINTNEXTLINE(readability-identifier-naming)
template<int N, int... S>
struct ESPDEPRECATED("Use std::make_index_sequence instead. Removed in 2026.6.0", "2025.12.0") gens
: gens<N - 1, N - 1, S...> {};
// NOLINTNEXTLINE(readability-identifier-naming)
template<int... S> struct gens<0, S...> { using type = seq<S...>; };
#if defined(__GNUC__) || defined(__clang__)