Просмотр исходного кода

config: fixed ENTT_IS_EMPTY macro definition

Michele Caini 6 лет назад
Родитель
Сommit
628a17ae72
1 измененных файлов с 2 добавлено и 1 удалено
  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