mirror of
https://github.com/ETLCPP/etl.git
synced 2026-11-09 14:49:53 +08:00
Keil ARM5 fixes
This commit is contained in:
parent
4d8f7f4943
commit
05d033ce3a
@ -749,11 +749,16 @@ namespace etl
|
||||
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 >
|
||||
@ -763,7 +768,7 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// Alignment templates.
|
||||
/// These require compiler specific intrinsics.
|
||||
#if ETL_CPP11_SUPPORTED
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_COMPILER_ARM5)
|
||||
template <typename T> struct alignment_of : integral_constant<size_t, alignof(T)> { };
|
||||
#elif ETL_COMPILER_MICROSOFT
|
||||
template <typename T> struct alignment_of : integral_constant<size_t, size_t(__alignof(T))> {};
|
||||
@ -1075,11 +1080,12 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// is_pod
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct is_pod : std::is_pod<T> {};
|
||||
template <typename T>
|
||||
struct is_pod : std::integral_constant<bool, std::is_standard_layout<T>::value && std::is_trivial<T>::value> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_pod_v = std::is_pod_v<T>;
|
||||
inline constexpr bool is_pod_v = std::is_standard_layout_v<T> && std::is_trivial_v<T>;
|
||||
#endif
|
||||
|
||||
#if !defined(ARDUINO) && ETL_NOT_USING_STLPORT
|
||||
|
||||
@ -736,8 +736,9 @@ namespace etl
|
||||
template <typename, typename>
|
||||
auto nonvoid_convertible(...)->etl::false_type;
|
||||
}
|
||||
|
||||
#if defined(ETL_COMPILER_ARM5)
|
||||
template <typename TFrom, typename TTo>
|
||||
template <typename TFrom, typename TTo>
|
||||
struct is_convertible : etl::integral_constant<bool, __is_convertible_to(TFrom, TTo)> {};
|
||||
#else
|
||||
template <typename TFrom, typename TTo>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user