Pārlūkot izejas kodu

config: move ENTT_CONSTEVAL to config.h

Michele Caini 1 gadu atpakaļ
vecāks
revīzija
d1abac2adc
2 mainītis faili ar 12 papildinājumiem un 11 dzēšanām
  1. 12 0
      src/entt/config/config.h
  2. 0 11
      src/entt/config/macro.h

+ 12 - 0
src/entt/config/config.h

@@ -17,6 +17,18 @@
 #    define ENTT_CATCH if(false)
 #endif
 
+#if __has_include(<version>)
+#    include <version>
+#
+#    if defined(__cpp_consteval)
+#        define ENTT_CONSTEVAL consteval
+#    endif
+#endif
+
+#ifndef ENTT_CONSTEVAL
+#    define ENTT_CONSTEVAL constexpr
+#endif
+
 #ifdef ENTT_USE_ATOMIC
 #    include <atomic>
 #    define ENTT_MAYBE_ATOMIC(Type) std::atomic<Type>

+ 0 - 11
src/entt/config/macro.h

@@ -6,17 +6,6 @@
 #define ENTT_STR(arg) #arg
 #define ENTT_XSTR(arg) ENTT_STR(arg)
 
-#define ENTT_CONSTEVAL constexpr
-
-#if __has_include(<version>)
-#    include <version>
-#
-#    if defined(__cpp_consteval)
-#        undef ENTT_CONSTEVAL
-#        define ENTT_CONSTEVAL consteval
-#    endif
-#endif
-
 // NOLINTEND(cppcoreguidelines-macro-usage)
 
 #endif