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/enum.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/enum.hpp')
| -rw-r--r-- | deps/include/entt/core/enum.hpp | 97 |
1 files changed, 0 insertions, 97 deletions
diff --git a/deps/include/entt/core/enum.hpp b/deps/include/entt/core/enum.hpp deleted file mode 100644 index c78ad5a..0000000 --- a/deps/include/entt/core/enum.hpp +++ /dev/null @@ -1,97 +0,0 @@ -#ifndef ENTT_CORE_ENUM_HPP
-#define ENTT_CORE_ENUM_HPP
-
-#include <type_traits>
-
-namespace entt {
-
-/**
- * @brief Enable bitmask support for enum classes.
- * @tparam Type The enum type for which to enable bitmask support.
- */
-template<typename Type, typename = void>
-struct enum_as_bitmask: std::false_type {};
-
-/*! @copydoc enum_as_bitmask */
-template<typename Type>
-struct enum_as_bitmask<Type, std::void_t<decltype(Type::_entt_enum_as_bitmask)>>: std::is_enum<Type> {};
-
-/**
- * @brief Helper variable template.
- * @tparam Type The enum class type for which to enable bitmask support.
- */
-template<typename Type>
-inline constexpr bool enum_as_bitmask_v = enum_as_bitmask<Type>::value;
-
-} // namespace entt
-
-/**
- * @brief Operator available for enums for which bitmask support is enabled.
- * @tparam Type Enum class type.
- * @param lhs The first value to use.
- * @param rhs The second value to use.
- * @return The result of invoking the operator on the underlying types of the
- * two values provided.
- */
-template<typename Type>
-[[nodiscard]] constexpr std::enable_if_t<entt::enum_as_bitmask_v<Type>, Type>
-operator|(const Type lhs, const Type rhs) noexcept {
- return static_cast<Type>(static_cast<std::underlying_type_t<Type>>(lhs) | static_cast<std::underlying_type_t<Type>>(rhs));
-}
-
-/*! @copydoc operator| */
-template<typename Type>
-[[nodiscard]] constexpr std::enable_if_t<entt::enum_as_bitmask_v<Type>, Type>
-operator&(const Type lhs, const Type rhs) noexcept {
- return static_cast<Type>(static_cast<std::underlying_type_t<Type>>(lhs) & static_cast<std::underlying_type_t<Type>>(rhs));
-}
-
-/*! @copydoc operator| */
-template<typename Type>
-[[nodiscard]] constexpr std::enable_if_t<entt::enum_as_bitmask_v<Type>, Type>
-operator^(const Type lhs, const Type rhs) noexcept {
- return static_cast<Type>(static_cast<std::underlying_type_t<Type>>(lhs) ^ static_cast<std::underlying_type_t<Type>>(rhs));
-}
-
-/**
- * @brief Operator available for enums for which bitmask support is enabled.
- * @tparam Type Enum class type.
- * @param value The value to use.
- * @return The result of invoking the operator on the underlying types of the
- * value provided.
- */
-template<typename Type>
-[[nodiscard]] constexpr std::enable_if_t<entt::enum_as_bitmask_v<Type>, Type>
-operator~(const Type value) noexcept {
- return static_cast<Type>(~static_cast<std::underlying_type_t<Type>>(value));
-}
-
-/*! @copydoc operator~ */
-template<typename Type>
-[[nodiscard]] constexpr std::enable_if_t<entt::enum_as_bitmask_v<Type>, bool>
-operator!(const Type value) noexcept {
- return !static_cast<std::underlying_type_t<Type>>(value);
-}
-
-/*! @copydoc operator| */
-template<typename Type>
-constexpr std::enable_if_t<entt::enum_as_bitmask_v<Type>, Type &>
-operator|=(Type &lhs, const Type rhs) noexcept {
- return (lhs = (lhs | rhs));
-}
-
-/*! @copydoc operator| */
-template<typename Type>
-constexpr std::enable_if_t<entt::enum_as_bitmask_v<Type>, Type &>
-operator&=(Type &lhs, const Type rhs) noexcept {
- return (lhs = (lhs & rhs));
-}
-
-/*! @copydoc operator| */
-template<typename Type>
-constexpr std::enable_if_t<entt::enum_as_bitmask_v<Type>, Type &>
-operator^=(Type &lhs, const Type rhs) noexcept {
- return (lhs = (lhs ^ rhs));
-}
-
-#endif
|
