From 7eff215eefebb000ef1eedfe60e4ab24351b0dc5 Mon Sep 17 00:00:00 2001 From: Mike Bloom Date: Fri, 17 Oct 2025 18:17:54 +0000 Subject: [PATCH] Fix array noexcept expr --- include/etl/array.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/etl/array.h b/include/etl/array.h index fb1670188..f24ca976b 100644 --- a/include/etl/array.h +++ b/include/etl/array.h @@ -143,7 +143,7 @@ namespace etl //************************************************************************* ETL_NODISCARD ETL_CONSTEXPR14 - reference operator[](size_t i) ETL_NOEXCEPT_EXPR(ETL_DEBUG_NOT_USING_EXCEPTIONS) + reference operator[](size_t i) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS || ETL_NOT_CHECKING_INDEX_OPERATOR) { ETL_ASSERT_CHECK_INDEX_OPERATOR(i < SIZE, ETL_ERROR(array_out_of_range)); @@ -156,7 +156,7 @@ namespace etl ///\param i The index of the element to access. //************************************************************************* ETL_NODISCARD - ETL_CONSTEXPR const_reference operator[](size_t i) const ETL_NOEXCEPT_EXPR(ETL_DEBUG_NOT_USING_EXCEPTIONS) + ETL_CONSTEXPR const_reference operator[](size_t i) const ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS || ETL_NOT_CHECKING_INDEX_OPERATOR) { // Throwing from c++11 constexpr requires special syntax #if ETL_USING_CPP11 && ETL_NOT_USING_CPP14 && ETL_USING_EXCEPTIONS && ETL_CHECKING_INDEX_OPERATOR