@@ -14,11 +14,9 @@
#ifndef ENTT_NO_ATOMIC
#include <atomic>
-template<typename Type>
-using maybe_atomic_t = std::atomic<Type>;
+#define ENTT_MAYBE_ATOMIC(Type) std::atomic<Type>
#else // ENTT_NO_ATOMIC
-using maybe_atomic_t = Type;
+#define ENTT_MAYBE_ATOMIC(Type) Type
#endif // ENTT_NO_ATOMIC
@@ -18,7 +18,7 @@ namespace entt {
*/
template<typename...>
class family {
- inline static maybe_atomic_t<ENTT_ID_TYPE> identifier;
+ inline static ENTT_MAYBE_ATOMIC(ENTT_ID_TYPE) identifier;
inline static const auto inner = identifier++;
@@ -45,7 +45,7 @@ struct monostate {
private:
template<typename Type>
- inline static maybe_atomic_t<Type> value{};
+ inline static ENTT_MAYBE_ATOMIC(Type) value{};
};