diff --git a/include/etl/type_traits.h b/include/etl/type_traits.h index ee01e614..f75fb0f1 100644 --- a/include/etl/type_traits.h +++ b/include/etl/type_traits.h @@ -335,7 +335,7 @@ namespace etl struct conditional_integral_constant { ETL_STATIC_ASSERT(etl::is_integral::value, "Not an integral type"); - static const T value = FALSE_VALUE; + static const T value = FALSE_VALUE; }; /// make_signed @@ -485,14 +485,14 @@ namespace etl ///\ingroup types //*************************************************************************** template struct is_one_of { - static const bool value = + static const bool value = etl::is_same::value || etl::is_same::value || etl::is_same::value || @@ -586,6 +586,21 @@ namespace etl typedef const type_t* const_pointer; typedef const type_t* const const_pointer_const; }; + + //*************************************************************************** + // size_of + //*************************************************************************** + template + struct size_of + { + static const size_t size = sizeof(T); + }; + + template <> + struct size_of + { + static const size_t size = 1; + }; } #endif