Fix warning -Wconstexpr-not-const

This commit is contained in:
zhaoshihan
2025-09-27 16:33:16 +08:00
committed by Jesse Beder
parent 4fe2fb83fe
commit 65c1c270db

View File

@@ -4023,44 +4023,44 @@ namespace jkj {
// Policy kind detectors. // Policy kind detectors.
struct is_sign_policy { struct is_sign_policy {
constexpr bool operator()(...) noexcept { return false; } constexpr bool operator()(...) const noexcept { return false; }
template <class Policy, class = typename Policy::sign_policy> template <class Policy, class = typename Policy::sign_policy>
constexpr bool operator()(dummy<Policy>) noexcept { constexpr bool operator()(dummy<Policy>) const noexcept {
return true; return true;
} }
}; };
struct is_trailing_zero_policy { struct is_trailing_zero_policy {
constexpr bool operator()(...) noexcept { return false; } constexpr bool operator()(...) const noexcept { return false; }
template <class Policy, class = typename Policy::trailing_zero_policy> template <class Policy, class = typename Policy::trailing_zero_policy>
constexpr bool operator()(dummy<Policy>) noexcept { constexpr bool operator()(dummy<Policy>) const noexcept {
return true; return true;
} }
}; };
struct is_decimal_to_binary_rounding_policy { struct is_decimal_to_binary_rounding_policy {
constexpr bool operator()(...) noexcept { return false; } constexpr bool operator()(...) const noexcept { return false; }
template <class Policy, class = typename Policy::decimal_to_binary_rounding_policy> template <class Policy, class = typename Policy::decimal_to_binary_rounding_policy>
constexpr bool operator()(dummy<Policy>) noexcept { constexpr bool operator()(dummy<Policy>) const noexcept {
return true; return true;
} }
}; };
struct is_binary_to_decimal_rounding_policy { struct is_binary_to_decimal_rounding_policy {
constexpr bool operator()(...) noexcept { return false; } constexpr bool operator()(...) const noexcept { return false; }
template <class Policy, class = typename Policy::binary_to_decimal_rounding_policy> template <class Policy, class = typename Policy::binary_to_decimal_rounding_policy>
constexpr bool operator()(dummy<Policy>) noexcept { constexpr bool operator()(dummy<Policy>) const noexcept {
return true; return true;
} }
}; };
struct is_cache_policy { struct is_cache_policy {
constexpr bool operator()(...) noexcept { return false; } constexpr bool operator()(...) const noexcept { return false; }
template <class Policy, class = typename Policy::cache_policy> template <class Policy, class = typename Policy::cache_policy>
constexpr bool operator()(dummy<Policy>) noexcept { constexpr bool operator()(dummy<Policy>) const noexcept {
return true; return true;
} }
}; };
struct is_preferred_integer_types_policy { struct is_preferred_integer_types_policy {
constexpr bool operator()(...) noexcept { return false; } constexpr bool operator()(...) const noexcept { return false; }
template <class Policy, class = typename Policy::preferred_integer_types_policy> template <class Policy, class = typename Policy::preferred_integer_types_policy>
constexpr bool operator()(dummy<Policy>) noexcept { constexpr bool operator()(dummy<Policy>) const noexcept {
return true; return true;
} }
}; };