From: Jacob Lifshay Date: Fri, 30 Jun 2017 12:20:01 +0000 (-0700) Subject: fix spurious warning about shifting more than size of type X-Git-Tag: gsoc-2017~74 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7b3aee0d0eae0d86d62511be876a8cc377fb9611;p=kazan.git fix spurious warning about shifting more than size of type --- 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