diff --git a/include/etl/type_traits.h b/include/etl/type_traits.h index 617b2f75..f1fdbc58 100644 --- a/include/etl/type_traits.h +++ b/include/etl/type_traits.h @@ -718,7 +718,9 @@ namespace etl //*************************************************************************** /// Alignment templates. /// These require compiler specific intrinsics. -#ifdef ETL_COMPILER_MICROSOFT +#if ETL_CPP11_SUPPORTED + template struct alignment_of : integral_constant { }; +#elif ETL_COMPILER_MICROSOFT template struct alignment_of : integral_constant {}; #elif defined(ETL_COMPILER_IAR) || defined(ETL_COMPILER_TI) template struct alignment_of : integral_constant {}; @@ -1304,7 +1306,7 @@ namespace etl struct is_one_of { static const bool value = etl::is_same::value || - etl::is_one_of::value; + etl::is_one_of::value; }; template @@ -1317,13 +1319,13 @@ namespace etl /// Template to determine if a type is one of a specified list. ///\ingroup types template struct is_one_of { - static const bool value = + static const bool value = etlstd::is_same::value || etlstd::is_same::value || etlstd::is_same::value || diff --git a/include/etl/type_traits_generator.h b/include/etl/type_traits_generator.h index 78a42254..e1ebc66b 100644 --- a/include/etl/type_traits_generator.h +++ b/include/etl/type_traits_generator.h @@ -730,7 +730,9 @@ namespace etl //*************************************************************************** /// Alignment templates. /// These require compiler specific intrinsics. -#ifdef ETL_COMPILER_MICROSOFT +#if ETL_CPP11_SUPPORTED + template struct alignment_of : integral_constant { }; +#elif ETL_COMPILER_MICROSOFT template struct alignment_of : integral_constant {}; #elif defined(ETL_COMPILER_IAR) || defined(ETL_COMPILER_TI) template struct alignment_of : integral_constant {};