From 636554812fe7dd267f3045e606f41c9fd0fed277 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Tue, 5 Dec 2017 18:47:20 +0000 Subject: [PATCH] Minor tweak to conditional_integral_constant --- src/type_traits.h | 13 +++++++------ src/type_traits_generator.h | 6 +++++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/type_traits.h b/src/type_traits.h index 350c8129..492296a8 100644 --- a/src/type_traits.h +++ b/src/type_traits.h @@ -54,6 +54,7 @@ SOFTWARE. #define __ETL_TYPE_TRAITS__ #include +#include #include "platform.h" #include "nullptr.h" @@ -334,7 +335,7 @@ namespace etl struct conditional_integral_constant { STATIC_ASSERT(etl::is_integral::value, "Not an integral type"); - static const T value = FALSE_VALUE; + static const T value = FALSE_VALUE; }; /// make_signed @@ -484,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 || diff --git a/src/type_traits_generator.h b/src/type_traits_generator.h index ef409202..bef84ee5 100644 --- a/src/type_traits_generator.h +++ b/src/type_traits_generator.h @@ -66,6 +66,7 @@ cog.outl("//******************************************************************** #define __ETL_TYPE_TRAITS__ #include +#include #include "platform.h" #include "nullptr.h" @@ -333,7 +334,10 @@ namespace etl /// conditional_integral_constant ///\ingroup type_traits template - struct conditional_integral_constant + struct conditional_integral_constant; + + template + struct conditional_integral_constant { STATIC_ASSERT(etl::is_integral::value, "Not an integral type"); static const T value = TRUE_VALUE;