[libcxx-commits] [PATCH] D71096: __bit_reference: fix -Wdeprecated-copy warnings

Fangrui Song via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Dec 12 16:32:48 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rGb7eb30d48131: __bit_reference: fix -Wdeprecated-copy warnings (authored by MaskRay).

Changed prior to commit:
  https://reviews.llvm.org/D71096?vs=233706&id=233711#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71096/new/

https://reviews.llvm.org/D71096

Files:
  libcxx/include/__bit_reference


Index: libcxx/include/__bit_reference
===================================================================
--- libcxx/include/__bit_reference
+++ libcxx/include/__bit_reference
@@ -47,6 +47,9 @@
     friend class __bit_const_reference<_Cp>;
     friend class __bit_iterator<_Cp, false>;
 public:
+    _LIBCPP_INLINE_VISIBILITY
+    __bit_reference(const __bit_reference&) = default;
+
     _LIBCPP_INLINE_VISIBILITY operator bool() const _NOEXCEPT
         {return static_cast<bool>(*__seg_ & __mask_);}
     _LIBCPP_INLINE_VISIBILITY bool operator ~() const _NOEXCEPT
@@ -133,6 +136,9 @@
     friend class __bit_iterator<_Cp, true>;
 public:
     _LIBCPP_INLINE_VISIBILITY
+    __bit_const_reference(const __bit_const_reference&) = default;
+
+    _LIBCPP_INLINE_VISIBILITY
     __bit_const_reference(const __bit_reference<_Cp>& __x) _NOEXCEPT
         : __seg_(__x.__seg_), __mask_(__x.__mask_) {}
 
@@ -147,7 +153,7 @@
     __bit_const_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT
         : __seg_(__s), __mask_(__m) {}
 
-    __bit_const_reference& operator=(const __bit_const_reference& __x);
+    __bit_const_reference& operator=(const __bit_const_reference&) = delete;
 };
 
 // find


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71096.233711.patch
Type: text/x-patch
Size: 1209 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20191213/4b9830d4/attachment.bin>


More information about the libcxx-commits mailing list