From c7d8ffd14fc4314e1590c2a2d879daa7b74453e0 Mon Sep 17 00:00:00 2001 From: fearlessTobi Date: Wed, 5 Sep 2018 02:24:44 +0200 Subject: [PATCH] Make bitfield assignment operator public This change needs to be made to get the code compiling again. It was suggested after a conversation with Lioncash. The conversation can be seen here: https://user-images.githubusercontent.com/20753089/45064197-b6107800-b0b2-11e8-9db8-f696299fb86a.PNG --- src/common/bit_field.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/common/bit_field.h b/src/common/bit_field.h index 0cc0a1be05..c5bb757dea 100644 --- a/src/common/bit_field.h +++ b/src/common/bit_field.h @@ -111,12 +111,6 @@ template struct BitField { private: - // We hide the copy assigment operator here, because the default copy - // assignment would copy the full storage value, rather than just the bits - // relevant to this particular bit field. - // We don't delete it because we want BitField to be trivially copyable. - BitField& operator=(const BitField&) = default; - // StorageType is T for non-enum types and the underlying type of T if // T is an enumeration. Note that T is wrapped within an enable_if in the // former case to workaround compile errors which arise when using @@ -128,6 +122,8 @@ private: using StorageTypeU = std::make_unsigned_t; public: + BitField& operator=(const BitField&) = default; + /// Constants to allow limited introspection of fields if needed static constexpr size_t position = Position; static constexpr size_t bits = Bits;