aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/types/EnumBitfield.hpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-01-22 20:17:38 +0100
committer hop311 <hop3114@gmail.com>2024-01-22 20:25:09 +0100
commitcaa2f31d536f568e485f15537db5e2f79f7616d5 (patch)
tree7cd8a379963af18c24f8dabfe7525b39f2333e0c /src/openvic-simulation/types/EnumBitfield.hpp
parent8205732a1b95f018f0898a2a4bc62e22f5bee0d3 (diff)
Miscellaneous bug fixes and format cleanupmisc-changes
Diffstat (limited to 'src/openvic-simulation/types/EnumBitfield.hpp')
-rw-r--r--src/openvic-simulation/types/EnumBitfield.hpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/openvic-simulation/types/EnumBitfield.hpp b/src/openvic-simulation/types/EnumBitfield.hpp
index 2b0a1cf..8753449 100644
--- a/src/openvic-simulation/types/EnumBitfield.hpp
+++ b/src/openvic-simulation/types/EnumBitfield.hpp
@@ -27,58 +27,58 @@ namespace OpenVic {
}
template<OpenVic::EnumSupportBitfield T>
-[[nodiscard]] constexpr inline auto operator|(const T lhs, const T rhs) noexcept {
+[[nodiscard]] inline constexpr auto operator|(const T lhs, const T rhs) noexcept {
using underlying_type = std::underlying_type_t<T>;
return static_cast<T>(static_cast<underlying_type>(lhs) | static_cast<underlying_type>(rhs));
}
template<OpenVic::EnumSupportBitfield T>
-[[nodiscard]] constexpr inline auto operator&(const T lhs, const T rhs) noexcept {
+[[nodiscard]] inline constexpr auto operator&(const T lhs, const T rhs) noexcept {
using underlying_type = std::underlying_type_t<T>;
return static_cast<T>(static_cast<underlying_type>(lhs) & static_cast<underlying_type>(rhs));
}
template<OpenVic::EnumSupportBitfield T>
-[[nodiscard]] constexpr inline auto operator^(const T lhs, const T rhs) noexcept {
+[[nodiscard]] inline constexpr auto operator^(const T lhs, const T rhs) noexcept {
using underlying_type = std::underlying_type_t<T>;
return static_cast<T>(static_cast<underlying_type>(lhs) ^ static_cast<underlying_type>(rhs));
}
template<OpenVic::EnumSupportBitfield T>
-[[nodiscard]] constexpr inline auto operator~(const T lhs) noexcept {
+[[nodiscard]] inline constexpr auto operator~(const T lhs) noexcept {
using underlying_type = std::underlying_type_t<T>;
return static_cast<T>(~static_cast<underlying_type>(lhs));
}
template<OpenVic::EnumSupportBitfield T>
-constexpr inline decltype(auto) operator|=(T& lhs, const T rhs) noexcept {
+inline constexpr decltype(auto) operator|=(T& lhs, const T rhs) noexcept {
using underlying_type = std::underlying_type_t<T>;
lhs = static_cast<T>(static_cast<underlying_type>(lhs) | static_cast<underlying_type>(rhs));
return lhs;
}
template<OpenVic::EnumSupportBitfield T>
-constexpr inline decltype(auto) operator&=(T& lhs, const T rhs) noexcept {
+inline constexpr decltype(auto) operator&=(T& lhs, const T rhs) noexcept {
using underlying_type = std::underlying_type_t<T>;
lhs = static_cast<T>(static_cast<underlying_type>(lhs) & static_cast<underlying_type>(rhs));
return lhs;
}
template<OpenVic::EnumSupportBitfield T>
-constexpr inline decltype(auto) operator^=(T& lhs, const T rhs) noexcept {
+inline constexpr decltype(auto) operator^=(T& lhs, const T rhs) noexcept {
using underlying_type = std::underlying_type_t<T>;
lhs = static_cast<T>(static_cast<underlying_type>(lhs) ^ static_cast<underlying_type>(rhs));
return lhs;
}
template<OpenVic::EnumSupportBitfield T>
-[[nodiscard]] constexpr inline bool operator<<(const T lhs, const T rhs) noexcept {
+[[nodiscard]] inline constexpr bool operator<<(const T lhs, const T rhs) noexcept {
using underlying_type = std::underlying_type_t<T>;
return (lhs & rhs) == rhs;
}
template<OpenVic::EnumSupportBitfield T>
-[[nodiscard]] constexpr inline bool operator>>(const T lhs, const T rhs) noexcept {
+[[nodiscard]] inline constexpr bool operator>>(const T lhs, const T rhs) noexcept {
using underlying_type = std::underlying_type_t<T>;
return (lhs & rhs) == lhs;
}