diff options
| author | untodesu <kirill@untode.su> | 2025-06-28 01:59:49 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-06-28 01:59:49 +0500 |
| commit | 61e5bcef2629e2d68b805a956a96fff264d4f74d (patch) | |
| tree | bca3a94bac79d34e3c0db57c77604f5a823ecbda /deps/include/entt/core/monostate.hpp | |
| parent | 88c01588aa0830e219eaa62588839e4d1e2883ce (diff) | |
| download | voxelius-61e5bcef2629e2d68b805a956a96fff264d4f74d.tar.bz2 voxelius-61e5bcef2629e2d68b805a956a96fff264d4f74d.zip | |
Restructure dependencies and update to C++20
- Nuked static_assert from almost everywhere in the project
- Nuked binary dependency support. Might add one later though
- Separated dependency headers into a separate include subdirectory
- Grafted a thirdpartylegalnotices.txt generator from RITEG
- Pushed development snapshot version to 2126 (26th week of 2025)
Diffstat (limited to 'deps/include/entt/core/monostate.hpp')
| -rw-r--r-- | deps/include/entt/core/monostate.hpp | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/deps/include/entt/core/monostate.hpp b/deps/include/entt/core/monostate.hpp deleted file mode 100644 index 57f5f41..0000000 --- a/deps/include/entt/core/monostate.hpp +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef ENTT_CORE_MONOSTATE_HPP
-#define ENTT_CORE_MONOSTATE_HPP
-
-#include "../config/config.h"
-#include "fwd.hpp"
-
-namespace entt {
-
-/**
- * @brief Minimal implementation of the monostate pattern.
- *
- * A minimal, yet complete configuration system built on top of the monostate
- * pattern. Thread safe by design, it works only with basic types like `int`s or
- * `bool`s.<br/>
- * Multiple types and therefore more than one value can be associated with a
- * single key. Because of this, users must pay attention to use the same type
- * both during an assignment and when they try to read back their data.
- * Otherwise, they can incur in unexpected results.
- */
-template<id_type>
-struct monostate {
- /**
- * @brief Assigns a value of a specific type to a given key.
- * @tparam Type Type of the value to assign.
- * @param val User data to assign to the given key.
- * @return This monostate object.
- */
- template<typename Type>
- monostate &operator=(Type val) noexcept {
- value<Type> = val;
- return *this;
- }
-
- /**
- * @brief Gets a value of a specific type for a given key.
- * @tparam Type Type of the value to get.
- * @return Stored value, if any.
- */
- template<typename Type>
- operator Type() const noexcept {
- return value<Type>;
- }
-
-private:
- template<typename Type>
- // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
- inline static ENTT_MAYBE_ATOMIC(Type) value{};
-};
-
-/**
- * @brief Helper variable template.
- * @tparam Value Value used to differentiate between different variables.
- */
-template<id_type Value>
-// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
-inline monostate<Value> monostate_v{};
-
-} // namespace entt
-
-#endif
|
