Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keil 5 fixes #293

Merged
merged 9 commits into from
Oct 27, 2020
2 changes: 1 addition & 1 deletion include/etl/limits.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion include/etl/type_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 >
Expand Down
3 changes: 2 additions & 1 deletion include/etl/unordered_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@ namespace etl

return *this;
}

#if ETL_CPP11_SUPPORTED
//*************************************************************************
/// Move assignment operator.
//*************************************************************************
Expand All @@ -1320,6 +1320,7 @@ namespace etl

return *this;
}
#endif

protected:

Expand Down