stl: atomic header

This commit is contained in:
skypjack
2026-03-31 08:20:12 +02:00
parent e7be9a94e8
commit a2a72bcce6
4 changed files with 19 additions and 2 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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
src/entt/stl/atomic.hpp Normal file
View File

@@ -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