summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-03-08 22:35:57 +0100
committerGitHub <noreply@github.com>2019-03-08 22:35:57 +0100
commit9909d40530d74bd57bd2f2450e72530843fbc124 (patch)
treee1b4b674ca19cb51fc41272321b77f20a32ef364 /src/common
parentMerge pull request #2209 from lioncash/reorder (diff)
parentkernel/hle_ipc: Convert std::shared_ptr IPC header instances to std::optional (diff)
downloadyuzu-9909d40530d74bd57bd2f2450e72530843fbc124.tar
yuzu-9909d40530d74bd57bd2f2450e72530843fbc124.tar.gz
yuzu-9909d40530d74bd57bd2f2450e72530843fbc124.tar.bz2
yuzu-9909d40530d74bd57bd2f2450e72530843fbc124.tar.lz
yuzu-9909d40530d74bd57bd2f2450e72530843fbc124.tar.xz
yuzu-9909d40530d74bd57bd2f2450e72530843fbc124.tar.zst
yuzu-9909d40530d74bd57bd2f2450e72530843fbc124.zip
Diffstat (limited to 'src/common')
-rw-r--r--src/common/bit_field.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/common/bit_field.h b/src/common/bit_field.h
index 21e07925d..7433c39ba 100644
--- a/src/common/bit_field.h
+++ b/src/common/bit_field.h
@@ -111,12 +111,6 @@
template <std::size_t Position, std::size_t Bits, typename T>
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.
- constexpr BitField& operator=(const BitField&) = default;
-
// UnderlyingType 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
@@ -163,9 +157,13 @@ public:
BitField(T val) = delete;
BitField& operator=(T val) = delete;
- // Force default constructor to be created
- // so that we can use this within unions
- constexpr BitField() = default;
+ constexpr BitField() noexcept = default;
+
+ constexpr BitField(const BitField&) noexcept = default;
+ constexpr BitField& operator=(const BitField&) noexcept = default;
+
+ constexpr BitField(BitField&&) noexcept = default;
+ constexpr BitField& operator=(BitField&&) noexcept = default;
constexpr FORCE_INLINE operator T() const {
return Value();