diff --git a/include/etl/type_traits_generator.h b/include/etl/type_traits_generator.h index b1cff3eb..c7449af6 100644 --- a/include/etl/type_traits_generator.h +++ b/include/etl/type_traits_generator.h @@ -255,8 +255,7 @@ namespace etl ///\ingroup type_traits template struct is_fundamental : integral_constant::value || is_void::value || - is_same::type>::value> {}; + is_same::type>::value> {}; /// is_compound ///\ingroup type_traits @@ -270,25 +269,27 @@ namespace etl /// is_pointer ///\ingroup type_traits - template struct is_pointer : false_type {}; - template struct is_pointer : true_type {}; + template struct is_pointer_helper : false_type {}; + template struct is_pointer_helper : true_type {}; + template struct is_pointer : is_pointer_helper::type> {}; /// is_reference ///\ingroup type_traits - template struct is_reference : false_type {}; - template struct is_reference : true_type {}; + template struct is_reference_helper : false_type {}; + template struct is_reference_helper : true_type {}; + template struct is_reference : is_reference_helper::type> {}; /// is_pod /// For C++03, only fundamental and pointers types are recognised. ///\ingroup type_traits -#if (ETL_CPP11_SUPPORTED && !defined(ARDUINO) && !defined(ETL_STLPORT)) && !defined(ETL_IN_UNIT_TEST) && !defined(ETL_NO_STL) +#if (ETL_CPP11_SUPPORTED && !defined(ARDUINO) && !defined(ETL_STLPORT)) && !defined(IN_TYPE_TRAITS_TEST) && !defined(ETL_NO_STL) // For compilers that support C++11 template struct is_pod : std::is_pod {}; #else template struct is_pod : etl::integral_constant::value || etl::is_pointer::value> {}; #endif -#if (ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED) && !defined(ETL_STLPORT) && !defined(ETL_IN_UNIT_TEST) && !defined(ETL_NO_STL) +#if (ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED) && !defined(ETL_STLPORT) && !defined(IN_TYPE_TRAITS_TEST) && !defined(ETL_NO_STL) /// is_trivially_constructible ///\ingroup type_traits template struct is_trivially_constructible : std::is_trivially_constructible {}; @@ -304,6 +305,10 @@ namespace etl /// is_trivially_copy_assignable ///\ingroup type_traits template struct is_trivially_copy_assignable : std::is_trivially_copy_assignable {}; + + /// is_trivially_copyable + ///\ingroup type_traits + template struct is_trivially_copyable : std::is_trivially_copyable {}; #else /// is_trivially_constructible /// For C++03, only POD types are recognised. @@ -324,6 +329,11 @@ namespace etl /// For C++03, only POD types are recognised. ///\ingroup type_traits template struct is_trivially_copy_assignable : etl::is_pod {}; + + /// is_trivially_copyable + /// For C++03, only POD types are recognised. + ///\ingroup type_traits + template struct is_trivially_copyable : etl::is_pod {}; #endif #if ETL_CPP11_SUPPORTED