From 78e789bf7b02ec8ed30dd8d3b682a2dd7e50adf2 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 14 Apr 2020 12:05:54 -0700 Subject: Silence a type conversion warning with GCC --- common/albyte.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/albyte.h b/common/albyte.h index a2f6ec28..2df96ac3 100644 --- a/common/albyte.h +++ b/common/albyte.h @@ -72,7 +72,8 @@ class bitfield { static constexpr size_t bits_per_byte{std::numeric_limits::digits}; static constexpr size_t NumElems{(N+bits_per_byte-1) / bits_per_byte}; - typename detail_::ElemT vals{}; + using storage_type = detail_::ElemT; + storage_type vals{}; public: template @@ -85,7 +86,7 @@ public: inline void unset() noexcept { static_assert(b < N, "Bit index out of range"); - vals &= ~(1 << b); + vals &= static_cast(~(1 << b)); } template inline bool get() const noexcept -- cgit v1.2.3