From 61e5bcef2629e2d68b805a956a96fff264d4f74d Mon Sep 17 00:00:00 2001 From: untodesu Date: Sat, 28 Jun 2025 01:59:49 +0500 Subject: 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) --- deps/include/entt/core/enum.hpp | 97 ----------------------------------------- 1 file changed, 97 deletions(-) delete mode 100644 deps/include/entt/core/enum.hpp (limited to 'deps/include/entt/core/enum.hpp') 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 - -namespace entt { - -/** - * @brief Enable bitmask support for enum classes. - * @tparam Type The enum type for which to enable bitmask support. - */ -template -struct enum_as_bitmask: std::false_type {}; - -/*! @copydoc enum_as_bitmask */ -template -struct enum_as_bitmask>: std::is_enum {}; - -/** - * @brief Helper variable template. - * @tparam Type The enum class type for which to enable bitmask support. - */ -template -inline constexpr bool enum_as_bitmask_v = enum_as_bitmask::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 -[[nodiscard]] constexpr std::enable_if_t, Type> -operator|(const Type lhs, const Type rhs) noexcept { - return static_cast(static_cast>(lhs) | static_cast>(rhs)); -} - -/*! @copydoc operator| */ -template -[[nodiscard]] constexpr std::enable_if_t, Type> -operator&(const Type lhs, const Type rhs) noexcept { - return static_cast(static_cast>(lhs) & static_cast>(rhs)); -} - -/*! @copydoc operator| */ -template -[[nodiscard]] constexpr std::enable_if_t, Type> -operator^(const Type lhs, const Type rhs) noexcept { - return static_cast(static_cast>(lhs) ^ static_cast>(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 -[[nodiscard]] constexpr std::enable_if_t, Type> -operator~(const Type value) noexcept { - return static_cast(~static_cast>(value)); -} - -/*! @copydoc operator~ */ -template -[[nodiscard]] constexpr std::enable_if_t, bool> -operator!(const Type value) noexcept { - return !static_cast>(value); -} - -/*! @copydoc operator| */ -template -constexpr std::enable_if_t, Type &> -operator|=(Type &lhs, const Type rhs) noexcept { - return (lhs = (lhs | rhs)); -} - -/*! @copydoc operator| */ -template -constexpr std::enable_if_t, Type &> -operator&=(Type &lhs, const Type rhs) noexcept { - return (lhs = (lhs & rhs)); -} - -/*! @copydoc operator| */ -template -constexpr std::enable_if_t, Type &> -operator^=(Type &lhs, const Type rhs) noexcept { - return (lhs = (lhs ^ rhs)); -} - -#endif -- cgit