From 870d0fd96ac8a32655d99ebca2b348952880358b Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Tue, 12 Jul 2022 16:32:04 +0100 Subject: [PATCH] Green Hills compiler compatibility --- arduino/library-arduino.json | 2 +- arduino/library-arduino.properties | 2 +- include/etl/endianness.h | 5 +++-- include/etl/private/variant_variadic.h | 10 +++++----- include/etl/version.h | 2 +- library.json | 2 +- library.properties | 2 +- version.txt | 2 +- 8 files changed, 14 insertions(+), 13 deletions(-) diff --git a/arduino/library-arduino.json b/arduino/library-arduino.json index 45b2d196..a37f87ae 100644 --- a/arduino/library-arduino.json +++ b/arduino/library-arduino.json @@ -1,6 +1,6 @@ { "name": "Embedded Template Library - Arduino", - "version": "20.30.0", + "version": "20.30.1", "authors": { "name": "John Wellbelove", "email": "john.wellbelove@etlcpp.com" diff --git a/arduino/library-arduino.properties b/arduino/library-arduino.properties index 8bb26239..3b50444d 100644 --- a/arduino/library-arduino.properties +++ b/arduino/library-arduino.properties @@ -1,5 +1,5 @@ name=Embedded Template Library - Arduino -version=20.30.0 +version=20.30.1 author= John Wellbelove maintainer=John Wellbelove license=MIT diff --git a/include/etl/endianness.h b/include/etl/endianness.h index 100391e8..459df58d 100644 --- a/include/etl/endianness.h +++ b/include/etl/endianness.h @@ -122,9 +122,10 @@ namespace etl } #if ETL_HAS_CONSTEXPR_ENDIANNESS - ETL_CONSTEXPR -#endif + static ETL_CONSTEXPR etl::endian value() +#else static etl::endian value() +#endif { return get(); } diff --git a/include/etl/private/variant_variadic.h b/include/etl/private/variant_variadic.h index a753f322..4aebeb66 100644 --- a/include/etl/private/variant_variadic.h +++ b/include/etl/private/variant_variadic.h @@ -1284,7 +1284,7 @@ namespace etl namespace private_variant { template - ETL_CONSTEXPR14 static TRet do_visit_single(TCallable&& f, TVariant&& v, TNext&&, TVariants&&... vs); + static ETL_CONSTEXPR14 TRet do_visit_single(TCallable&& f, TVariant&& v, TNext&&, TVariants&&... vs); //*************************************************************************** /// Dummy-struct used to indicate that the return type should be auto-deduced @@ -1407,7 +1407,7 @@ namespace etl /// Dispatch current variant into recursive calls to dispatch the rest. //*************************************************************************** template - ETL_CONSTEXPR14 static TRet do_visit(TCallable&& f, TVariant&& v, index_sequence, TVarRest&&... variants) + static ETL_CONSTEXPR14 TRet do_visit(TCallable&& f, TVariant&& v, index_sequence, TVarRest&&... variants) { ETL_ASSERT(!v.valueless_by_exception(), ETL_ERROR(bad_variant_access)); @@ -1423,7 +1423,7 @@ namespace etl } template - ETL_CONSTEXPR14 static TRet visit(TCallable&& f, TVariant&& v, TVs&&... vs) + static ETL_CONSTEXPR14 TRet visit(TCallable&& f, TVariant&& v, TVs&&... vs) { constexpr size_t variants = etl::variant_size::type>::value; return private_variant::do_visit(static_cast(f), @@ -1456,7 +1456,7 @@ namespace etl }; template - ETL_CONSTEXPR14 static TRet do_visit_single(TCallable&& f, TVariant&& v, TNext&& next, TVariants&&... vs) + static ETL_CONSTEXPR14 TRet do_visit_single(TCallable&& f, TVariant&& v, TNext&& next, TVariants&&... vs) { return private_variant::visit(constexpr_visit_closure(static_cast(f), static_cast(v)), static_cast(next), static_cast(vs)...); @@ -1469,7 +1469,7 @@ namespace etl /// "auto return type" signature and c++20 explicit template return type. //*************************************************************************** template > - ETL_CONSTEXPR14 static TDeducedReturn visit(TCallable&& f, TVariants&&... vs) + static ETL_CONSTEXPR14 TDeducedReturn visit(TCallable&& f, TVariants&&... vs) { return private_variant::visit(static_cast(f), static_cast(vs)...); } diff --git a/include/etl/version.h b/include/etl/version.h index c5ba0ab7..7b625efa 100644 --- a/include/etl/version.h +++ b/include/etl/version.h @@ -40,7 +40,7 @@ SOFTWARE. #define ETL_VERSION_MAJOR 20 #define ETL_VERSION_MINOR 30 -#define ETL_VERSION_PATCH 0 +#define ETL_VERSION_PATCH 1 #define ETL_VERSION ETL_STRING(ETL_VERSION_MAJOR) "." ETL_STRING(ETL_VERSION_MINOR) "." ETL_STRING(ETL_VERSION_PATCH) #define ETL_VERSION_W ETL_WIDE_STRING(ETL_VERSION_MAJOR) L"." ETL_WIDE_STRING(ETL_VERSION_MINOR) L"." ETL_WIDE_STRING(ETL_VERSION_PATCH) diff --git a/library.json b/library.json index bd6eebeb..6340ad91 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "Embedded Template Library", - "version": "20.30.0", + "version": "20.30.1", "authors": { "name": "John Wellbelove", "email": "john.wellbelove@etlcpp.com" diff --git a/library.properties b/library.properties index 2a0318ca..618e44ae 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Embedded Template Library -version=20.30.0 +version=20.30.1 author= John Wellbelove maintainer=John Wellbelove license=MIT diff --git a/version.txt b/version.txt index e01baf12..871a6ebe 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -20.30.0 +20.30.1