Keil 5 fixes (#293)

* unordered_map fix for non c++11 profiles.

* __USE_C99_MATH fix for armcc5

* is_convertible fix for armcc5
This commit is contained in:
Rolan Reznik 2020-10-27 10:52:53 +02:00 committed by GitHub
parent cc05b1df52
commit 4d8f7f4943
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View File

@ -36,7 +36,7 @@ SOFTWARE.
#include "char_traits.h"
#include "integral_limits.h"
#if ETL_NOT_USING_STL && defined(ETL_COMPILER_ARM5)
#if ETL_NOT_USING_STL && defined(ETL_COMPILER_ARM5) && !defined(__USE_C99_MATH)
// Required for nan, nanf, nanl
#define __USE_C99_MATH
#endif

View File

@ -736,12 +736,16 @@ namespace etl
template <typename, typename>
auto nonvoid_convertible(...)->etl::false_type;
}
#if defined(ETL_COMPILER_ARM5)
template <typename TFrom, typename TTo>
struct is_convertible : etl::integral_constant<bool, __is_convertible_to(TFrom, TTo)> {};
#else
template <typename TFrom, typename TTo>
struct is_convertible : etl::integral_constant<bool, (decltype(private_type_traits::returnable<TTo>(0))::value &&
decltype(private_type_traits::nonvoid_convertible<TFrom, TTo>(0))::value) ||
(etl::is_void<TFrom>::value && etl::is_void<TTo>::value)> {};
#endif
#endif
#if ETL_CPP17_SUPPORTED
template <typename TFrom, typename TTo >

View File

@ -1306,7 +1306,7 @@ namespace etl
return *this;
}
#if ETL_CPP11_SUPPORTED
//*************************************************************************
/// Move assignment operator.
//*************************************************************************
@ -1320,6 +1320,7 @@ namespace etl
return *this;
}
#endif
protected: