From 6c4f111e9c6e81e80b2bde6751f23df8155de7cd Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Tue, 11 Apr 2023 16:32:30 +0100 Subject: [PATCH] static member constants --- include/etl/private/choose_namespace.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/include/etl/private/choose_namespace.h b/include/etl/private/choose_namespace.h index 44b0c440..494d030f 100644 --- a/include/etl/private/choose_namespace.h +++ b/include/etl/private/choose_namespace.h @@ -33,6 +33,7 @@ SOFTWARE. #undef ETL_OR_STD #undef ETL_OR_STD11 +#undef ETL_OR_STD14 #if ETL_NOT_USING_STL && !defined(ETL_IN_UNIT_TEST) // If we're not using the STL and we are not unit testing, then use the ETL's definitions under the etl namespace @@ -58,4 +59,28 @@ SOFTWARE. #define ETL_USING_ETL11_NAMESPACE 0 #endif +#if (ETL_NOT_USING_STL && !defined(ETL_IN_UNIT_TEST)) || ETL_CPP14_NOT_SUPPORTED + // If we're not using the STL and we are not unit testing or C++14 is not supported, then use the ETL's definitions under the etl namespace + #define ETL_OR_STD14 etl + #define ETL_USING_STD14_NAMESPACE 0 + #define ETL_USING_ETL14_NAMESPACE 1 +#else + // We will use the STL's definitions under the std namespace + #define ETL_OR_STD14 std + #define ETL_USING_STD14_NAMESPACE 1 + #define ETL_USING_ETL14_NAMESPACE 0 +#endif + +#if (ETL_NOT_USING_STL && !defined(ETL_IN_UNIT_TEST)) || ETL_CPP17_NOT_SUPPORTED + // If we're not using the STL and we are not unit testing or C++17 is not supported, then use the ETL's definitions under the etl namespace + #define ETL_OR_STD17 etl + #define ETL_USING_STD17_NAMESPACE 0 + #define ETL_USING_ETL17_NAMESPACE 1 +#else + // We will use the STL's definitions under the std namespace + #define ETL_OR_STD17 std + #define ETL_USING_STD17_NAMESPACE 1 + #define ETL_USING_ETL17_NAMESPACE 0 +#endif + #endif