From 297b7e6786c59dfd8e2d243363773e94c447b7e4 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Sun, 10 Nov 2024 10:16:10 +0000 Subject: [PATCH] Redefined ETL_DEPRECATED --- include/etl/platform.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/include/etl/platform.h b/include/etl/platform.h index e66a0e08d..56ab83103 100644 --- a/include/etl/platform.h +++ b/include/etl/platform.h @@ -315,9 +315,15 @@ SOFTWARE. //************************************* // C++14 #if ETL_USING_CPP14 && !defined(ETL_FORCE_NO_ADVANCED_CPP) - #define ETL_CONSTEXPR14 constexpr - #define ETL_DEPRECATED [[deprecated]] - #define ETL_DEPRECATED_REASON(reason) [[deprecated(reason)]] + #define ETL_CONSTEXPR14 constexpr + + #if !defined(ETL_IN_UNIT_TEST) + #define ETL_DEPRECATED [[deprecated]] + #define ETL_DEPRECATED_REASON(reason) [[deprecated(reason)]] + #else + #define ETL_DEPRECATED + #define ETL_DEPRECATED_REASON(reason) + #endif #else #define ETL_CONSTEXPR14 #define ETL_DEPRECATED