From d21be04f662cc961e574e9f5b980cfb50588bde0 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Thu, 4 Jun 2020 19:15:09 +0100 Subject: [PATCH] Fixed type traits C++03 compatibility --- include/etl/generators/type_traits_generator.h | 2 ++ include/etl/platform.h | 10 +++++++++- include/etl/type_traits.h | 2 ++ include/etl/version.h | 2 +- library.json | 2 +- library.properties | 2 +- support/Release notes.txt | 4 ++++ 7 files changed, 20 insertions(+), 4 deletions(-) diff --git a/include/etl/generators/type_traits_generator.h b/include/etl/generators/type_traits_generator.h index 77aec58a..007f1215 100644 --- a/include/etl/generators/type_traits_generator.h +++ b/include/etl/generators/type_traits_generator.h @@ -1531,6 +1531,7 @@ namespace etl }; #endif +#if ETL_CPP11_SUPPORTED template using types_t = typename types::type; @@ -1551,6 +1552,7 @@ namespace etl template using types_cpc = typename types::const_pointer_const; +#endif //*************************************************************************** /// size_of diff --git a/include/etl/platform.h b/include/etl/platform.h index 09cce90a..6e075bd2 100644 --- a/include/etl/platform.h +++ b/include/etl/platform.h @@ -48,7 +48,15 @@ SOFTWARE. #define ETL_PLATFORM_64BIT (UINT64_MAX == UINTPTR_MAX) // Include the user's profile definition. -#include "etl_profile.h" +#if !defined(ETL_NO_PROFILE_HEADER) && defined(__has_include) + #if !__has_include("etl_profile.h") + #define ETL_NO_PROFILE_HEADER + #endif +#endif + +#if !defined(ETL_NO_PROFILE_HEADER) + #include "etl_profile.h" +#endif // Helper macro, so we don't have to use double negatives. // The ETL will use the STL, unless ETL_NO_STL is defined. diff --git a/include/etl/type_traits.h b/include/etl/type_traits.h index 753f8122..a959b73b 100644 --- a/include/etl/type_traits.h +++ b/include/etl/type_traits.h @@ -1524,6 +1524,7 @@ namespace etl }; #endif +#if ETL_CPP11_SUPPORTED template using types_t = typename types::type; @@ -1544,6 +1545,7 @@ namespace etl template using types_cpc = typename types::const_pointer_const; +#endif //*************************************************************************** /// size_of diff --git a/include/etl/version.h b/include/etl/version.h index 498e7ad4..543794fb 100644 --- a/include/etl/version.h +++ b/include/etl/version.h @@ -39,7 +39,7 @@ SOFTWARE. #define ETL_VERSION_MAJOR 18 #define ETL_VERSION_MINOR 3 -#define ETL_VERSION_PATCH 2 +#define ETL_VERSION_PATCH 3 #define ETL_VERSION ETL_STRINGIFY(ETL_VERSION_MAJOR) "." ETL_STRINGIFY(ETL_VERSION_MINOR) "." ETL_STRINGIFY(ETL_VERSION_PATCH) #define ETL_VERSION_W ETL_STRINGIFY(ETL_VERSION_MAJOR) L"." ETL_STRINGIFY(ETL_VERSION_MINOR) L"." ETL_STRINGIFY(ETL_VERSION_PATCH) #define ETL_VERSION_U16 ETL_STRINGIFY(ETL_VERSION_MAJOR) u"." ETL_STRINGIFY(ETL_VERSION_MINOR) u"." ETL_STRINGIFY(ETL_VERSION_PATCH) diff --git a/library.json b/library.json index cc1e9734..9d36a26b 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "Embedded Template Library", - "version": "18.3.2", + "version": "18.3.3", "authors": { "name": "John Wellbelove", "email": "john.wellbelove@etlcpp.com" diff --git a/library.properties b/library.properties index 6a025d7d..afdd41ea 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Embedded Template Library -version=18.3.2 +version=18.3.3 author= John Wellbelove maintainer=John Wellbelove license=MIT diff --git a/support/Release notes.txt b/support/Release notes.txt index 7af7c04d..c0541803 100644 --- a/support/Release notes.txt +++ b/support/Release notes.txt @@ -1,3 +1,7 @@ +=============================================================================== +18.3.3 +C++03 compatibility fix for type_traits.h + =============================================================================== 18.3.2 C++03 compatibility fix for pool.h