1#ifndef ENTT_CORE_MONOSTATE_HPP
2#define ENTT_CORE_MONOSTATE_HPP
4#include "../config/config.h"
28 template<
typename Type>
39 template<
typename Type>
45 template<
typename Type>
47 inline static ENTT_MAYBE_ATOMIC(Type) value{};
54template<
id_type Value>
constexpr Type make_obj_using_allocator(const Allocator &allocator, Args &&...args)
Uses-allocator construction utility (waiting for C++20).
monostate< Value > monostate_v
Helper variable template.
Minimal implementation of the monostate pattern.
monostate & operator=(Type val) noexcept
Assigns a value of a specific type to a given key.