From 7b3aee0d0eae0d86d62511be876a8cc377fb9611 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Fri, 30 Jun 2017 05:20:01 -0700 Subject: [PATCH] fix spurious warning about shifting more than size of type --- src/util/bitset.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/bitset.h b/src/util/bitset.h index ca93b74..f61b5c3 100644 --- a/src/util/bitset.h +++ b/src/util/bitset.h @@ -187,7 +187,9 @@ public: constexpr bitset(unsigned long long val) noexcept : Base(bit_count >= std::numeric_limits::digits ? val : - val & ((1ULL << bit_count) - 1ULL)) + val & ((1ULL << detail::Bitset_nontemplate_base::constexpr_min( + bit_count, std::numeric_limits::digits - 1)) + - 1ULL)) { } class reference final -- 2.30.2