[libcxx-commits] [libcxx] 02bb202 - [libc++] Fix -Wdeprecated-copy warnings in __bit_reference

Eric Christopher via libcxx-commits libcxx-commits at lists.llvm.org
Wed Dec 11 23:51:05 PST 2019


Author: Eric Christopher
Date: 2019-12-11T23:50:28-08:00
New Revision: 02bb20223bda5add729402962c70d0ebd0d98af2

URL: https://github.com/llvm/llvm-project/commit/02bb20223bda5add729402962c70d0ebd0d98af2
DIFF: https://github.com/llvm/llvm-project/commit/02bb20223bda5add729402962c70d0ebd0d98af2.diff

LOG: [libc++] Fix -Wdeprecated-copy warnings in __bit_reference

Add a couple of default copy constructors to fix the warning.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D71395

Added: 
    

Modified: 
    libcxx/include/__bit_reference

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__bit_reference b/libcxx/include/__bit_reference
index 05dfbe7e9fff..f035eeae7af5 100644
--- a/libcxx/include/__bit_reference
+++ b/libcxx/include/__bit_reference
@@ -62,6 +62,8 @@ public:
         return *this;
     }
 
+    __bit_reference(const __bit_reference&) = default;
+
     _LIBCPP_INLINE_VISIBILITY
     __bit_reference& operator=(const __bit_reference& __x) _NOEXCEPT
         {return operator=(static_cast<bool>(__x));}
@@ -148,6 +150,7 @@ private:
         : __seg_(__s), __mask_(__m) {}
 
     __bit_const_reference& operator=(const __bit_const_reference& __x);
+    __bit_const_reference(const __bit_const_reference&) = default;
 };
 
 // find


        


More information about the libcxx-commits mailing list