Explorar o código

config: fixed ENTT_IS_EMPTY macro definition

Michele Caini %!s(int64=6) %!d(string=hai) anos
pai
achega
628a17ae72
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/entt/config/config.h

+ 2 - 1
src/entt/config/config.h

@@ -46,8 +46,9 @@
 #   include <type_traits>
 #   define ENTT_IS_EMPTY(Type) std::is_empty_v<Type>
 #else
+#   include <type_traits>
 #   // sfinae-friendly definition
-#   define ENTT_IS_EMPTY(Type) decltype(Type, bool{}){}
+#   define ENTT_IS_EMPTY(Type) (false && std::is_empty_v<Type>)
 #endif