diff --git a/src/Common/betype.h b/src/Common/betype.h index 62762da4..e684fb93 100644 --- a/src/Common/betype.h +++ b/src/Common/betype.h @@ -22,7 +22,7 @@ constexpr T bswap(T i) template constexpr T SwapEndian(T value) { - if constexpr (boost::is_integral::value) + if constexpr (std::is_integral::value) { #ifdef _MSC_VER if constexpr (sizeof(T) == sizeof(uint32_t)) @@ -33,7 +33,7 @@ constexpr T SwapEndian(T value) return (T)bswap((std::make_unsigned_t)value); } - else if constexpr (boost::is_floating_point::value) + else if constexpr (std::is_floating_point::value) { if constexpr (sizeof(T) == sizeof(uint32_t)) { @@ -46,18 +46,18 @@ constexpr T SwapEndian(T value) return *(T*)&tmp; } } - else if constexpr (boost::is_enum::value) + else if constexpr (std::is_enum::value) { return (T)SwapEndian((std::underlying_type_t)value); } - else if constexpr (boost::is_base_of::value) + else if constexpr (std::is_base_of::value) { const auto tmp = bswap(*(uint32_t*)&value); return *(T*)&tmp; } else { - static_assert(boost::is_integral::value, "unsupported betype specialization!"); + static_assert(std::is_integral::value, "unsupported betype specialization!"); } return value; diff --git a/src/config/ConfigValue.h b/src/config/ConfigValue.h index b53992de..11fc1e48 100644 --- a/src/config/ConfigValue.h +++ b/src/config/ConfigValue.h @@ -96,14 +96,14 @@ public: m_value = v; } - template >> + template >> void SetValue(std::string_view v) { std::lock_guard lock(m_mutex); m_value = v; } - template >> + template >> void SetValue(std::wstring_view v) { std::lock_guard lock(m_mutex); @@ -171,21 +171,21 @@ public: } // init from enum with iterators - template::value && EnableEnumIterators::enable, TType>> + template::value && EnableEnumIterators::enable, TType>> constexpr ConfigValueBounds() : base_type(), m_min_value(begin(TEnum{})), m_max_value(rbegin(TEnum{})) { assert(m_min_value <= this->GetInitValue() && this->GetInitValue() <= m_max_value); } - template::value && EnableEnumIterators::enable, TType>> + template::value && EnableEnumIterators::enable, TType>> constexpr ConfigValueBounds(const TType& init_value) : base_type(std::forward(init_value)), m_min_value(begin(init_value)), m_max_value(rbegin(init_value)) { assert(m_min_value <= init_value && init_value <= m_max_value); } - template::value && EnableEnumIterators::enable, TType>> + template::value && EnableEnumIterators::enable, TType>> constexpr ConfigValueBounds(TType&& init_value) : base_type(std::forward(init_value)), m_min_value(begin(init_value)), m_max_value(rbegin(init_value)) {