mirror of
https://github.com/ETLCPP/etl.git
synced 2026-11-09 22:59:47 +08:00
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:
parent
cc05b1df52
commit
4d8f7f4943
@ -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
|
||||
|
||||
@ -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 >
|
||||
|
||||
@ -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:
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user