diff --git a/src/type_traits_generator.h b/src/type_traits_generator.h index da7d9cf0..0a1471d5 100644 --- a/src/type_traits_generator.h +++ b/src/type_traits_generator.h @@ -428,8 +428,10 @@ namespace etl /// is_base_of ///\ingroup type_traits - template - struct is_base_of + template::value || etl::is_fundamental::value)> + struct is_base_of { private: @@ -444,6 +446,13 @@ namespace etl static const bool value = (sizeof(check((internal*)0)) == sizeof(TBase*)); }; + // For when TBase or TDerived is a fundamental type. + template + struct is_base_of + { + static const bool value = false; + }; + /// Alignment templates. /// These require compiler specific intrinsics. ///\ingroup type_traits