Преглед изворни кода

core: PS4 build fix for entt::any (#657)

PS4 headers doesn't define __cpp_lib_launder which fails to compile with -Werror
Kartik Saranathan пре 5 година
родитељ
комит
9d1a210c97
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/entt/core/any.hpp

+ 1 - 1
src/entt/core/any.hpp

@@ -73,7 +73,7 @@ class any {
                     break;
                 }
             } else if constexpr(in_situ<Type>) {
-                #if __cpp_lib_launder >= 201606L
+                #if defined(__cpp_lib_launder) && __cpp_lib_launder >= 201606L
                 auto *instance = const_cast<Type *>(std::launder(reinterpret_cast<const Type *>(&from.storage)));
                 #else
                 auto *instance = const_cast<Type *>(reinterpret_cast<const Type *>(&from.storage));