Skip to content

Commit

Permalink
Green Hills compiler compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jwellbelove committed Jul 12, 2022
1 parent e6fdd32 commit 870d0fd
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion arduino/library-arduino.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Embedded Template Library - Arduino",
"version": "20.30.0",
"version": "20.30.1",
"authors": {
"name": "John Wellbelove",
"email": "[email protected]"
Expand Down
2 changes: 1 addition & 1 deletion arduino/library-arduino.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Embedded Template Library - Arduino
version=20.30.0
version=20.30.1
author= John Wellbelove <[email protected]>
maintainer=John Wellbelove <[email protected]>
license=MIT
Expand Down
5 changes: 3 additions & 2 deletions include/etl/endianness.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
10 changes: 5 additions & 5 deletions include/etl/private/variant_variadic.h
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ namespace etl
namespace private_variant
{
template <typename TRet, typename TCallable, typename TVariant, size_t tIndex, typename TNext, typename... TVariants>
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
Expand Down Expand Up @@ -1407,7 +1407,7 @@ namespace etl
/// Dispatch current variant into recursive calls to dispatch the rest.
//***************************************************************************
template <typename TRet, typename TCallable, typename TVariant, size_t... tIndices, typename... TVarRest>
ETL_CONSTEXPR14 static TRet do_visit(TCallable&& f, TVariant&& v, index_sequence<tIndices...>, TVarRest&&... variants)
static ETL_CONSTEXPR14 TRet do_visit(TCallable&& f, TVariant&& v, index_sequence<tIndices...>, TVarRest&&... variants)
{
ETL_ASSERT(!v.valueless_by_exception(), ETL_ERROR(bad_variant_access));

Expand All @@ -1423,7 +1423,7 @@ namespace etl
}

template <typename TRet, typename TCallable, typename TVariant, typename... TVs>
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<typename remove_reference<TVariant>::type>::value;
return private_variant::do_visit<TRet>(static_cast<TCallable&&>(f),
Expand Down Expand Up @@ -1456,7 +1456,7 @@ namespace etl
};

template <typename TRet, typename TCallable, typename TVariant, size_t tIndex, typename TNext, typename... TVariants>
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<TRet>(constexpr_visit_closure<TRet, TCallable, TVariant, tIndex>(static_cast<TCallable&&>(f), static_cast<TVariant&&>(v)),
static_cast<TNext&&>(next), static_cast<TVariants&&>(vs)...);
Expand All @@ -1469,7 +1469,7 @@ namespace etl
/// "auto return type" signature and c++20 explicit template return type.
//***************************************************************************
template <typename TRet = private_variant::visit_auto_return, typename... TVariants, typename TCallable, typename TDeducedReturn = private_variant::visit_result_t<TRet, TCallable, TVariants...> >
ETL_CONSTEXPR14 static TDeducedReturn visit(TCallable&& f, TVariants&&... vs)
static ETL_CONSTEXPR14 TDeducedReturn visit(TCallable&& f, TVariants&&... vs)
{
return private_variant::visit<TDeducedReturn>(static_cast<TCallable&&>(f), static_cast<TVariants&&>(vs)...);
}
Expand Down
2 changes: 1 addition & 1 deletion include/etl/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Embedded Template Library",
"version": "20.30.0",
"version": "20.30.1",
"authors": {
"name": "John Wellbelove",
"email": "[email protected]"
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Embedded Template Library
version=20.30.0
version=20.30.1
author= John Wellbelove <[email protected]>
maintainer=John Wellbelove <[email protected]>
license=MIT
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.30.0
20.30.1

0 comments on commit 870d0fd

Please sign in to comment.