diff --git a/include/etl/generators/type_traits_generator.h b/include/etl/generators/type_traits_generator.h index 007f1215..077b5f43 100644 --- a/include/etl/generators/type_traits_generator.h +++ b/include/etl/generators/type_traits_generator.h @@ -749,11 +749,16 @@ namespace etl auto nonvoid_convertible(...)->etl::false_type; } +#if defined(ETL_COMPILER_ARM5) + template + struct is_convertible : etl::integral_constant {}; +#else template struct is_convertible : etl::integral_constant(0))::value && decltype(private_type_traits::nonvoid_convertible(0))::value) || (etl::is_void::value && etl::is_void::value)> {}; #endif +#endif #if ETL_CPP17_SUPPORTED template @@ -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 struct alignment_of : integral_constant { }; #elif ETL_COMPILER_MICROSOFT template struct alignment_of : integral_constant {}; @@ -1075,11 +1080,12 @@ namespace etl //*************************************************************************** /// is_pod ///\ingroup type_traits - template struct is_pod : std::is_pod {}; + template + struct is_pod : std::integral_constant::value && std::is_trivial::value> {}; #if ETL_CPP17_SUPPORTED template - inline constexpr bool is_pod_v = std::is_pod_v; + inline constexpr bool is_pod_v = std::is_standard_layout_v && std::is_trivial_v; #endif #if !defined(ARDUINO) && ETL_NOT_USING_STLPORT diff --git a/include/etl/type_traits.h b/include/etl/type_traits.h index e2e5023b..a9bf689c 100644 --- a/include/etl/type_traits.h +++ b/include/etl/type_traits.h @@ -736,8 +736,9 @@ namespace etl template auto nonvoid_convertible(...)->etl::false_type; } + #if defined(ETL_COMPILER_ARM5) -template + template struct is_convertible : etl::integral_constant {}; #else template