skypjack 3 дней назад
Родитель
Сommit
a2a72bcce6
4 измененных файлов с 19 добавлено и 2 удалено
  1. 1 0
      CMakeLists.txt
  2. 2 2
      src/entt/config/config.h
  3. 1 0
      src/entt/entt.hpp
  4. 15 0
      src/entt/stl/atomic.hpp

+ 1 - 0
CMakeLists.txt

@@ -195,6 +195,7 @@ if(ENTT_INCLUDE_HEADERS)
         signal/emitter.hpp
         signal/fwd.hpp
         signal/sigh.hpp
+        stl/atomic.hpp
         stl/functional.hpp
         stl/iterator.hpp
         stl/memory.hpp

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

@@ -36,8 +36,8 @@
 #endif
 
 #ifdef ENTT_USE_ATOMIC
-#    include <atomic>
-#    define ENTT_MAYBE_ATOMIC(Type) std::atomic<Type>
+#    include "../stl/atomic.hpp"
+#    define ENTT_MAYBE_ATOMIC(Type) stl::atomic<Type>
 #else
 #    define ENTT_MAYBE_ATOMIC(Type) Type
 #endif

+ 1 - 0
src/entt/entt.hpp

@@ -69,6 +69,7 @@ namespace entt::stl {}
 #include "signal/dispatcher.hpp"
 #include "signal/emitter.hpp"
 #include "signal/sigh.hpp"
+#include "stl/atomic.hpp"
 #include "stl/functional.hpp"
 #include "stl/iterator.hpp"
 #include "stl/memory.hpp"

+ 15 - 0
src/entt/stl/atomic.hpp

@@ -0,0 +1,15 @@
+#ifndef ENTT_STL_ATOMIC_HPP
+#define ENTT_STL_ATOMIC_HPP
+
+#include <atomic>
+#include "../config/config.h"
+
+/*! @cond ENTT_INTERNAL */
+namespace entt::stl {
+
+using std::atomic;
+
+} // namespace entt::stl
+/*! @endcond */
+
+#endif