From b6300d97ff6594cd69dc413eb87295a1be50bb98 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Wed, 7 May 2025 07:24:39 +0100 Subject: [PATCH] C++03 compatibiity to to_underlying --- include/etl/utility.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/etl/utility.h b/include/etl/utility.h index 00ba8ca8..81c8c562 100644 --- a/include/etl/utility.h +++ b/include/etl/utility.h @@ -138,9 +138,9 @@ namespace etl // Gets the underlying type of an enum. //*********************************** template - ETL_CONSTEXPR underlying_type_t to_underlying(T value) ETL_NOEXCEPT + ETL_CONSTEXPR typename underlying_type::type to_underlying(T value) ETL_NOEXCEPT { - return static_cast>(value); + return static_cast::type>(value); } // We can't have std::swap and etl::swap templates coexisting in the unit tests