]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Mark the copy/move constructor/operator= of auto_bitmap as delete
authorAndrew Pinski <quic_apinski@quicinc.com>
Sat, 14 Sep 2024 03:17:15 +0000 (20:17 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Sun, 15 Sep 2024 05:51:14 +0000 (22:51 -0700)
Since we are written in C++11, these should be marked as delete rather
than just private.

Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

* bitmap.h (class auto_bitmap): Mark copy/move constructor/operator=
as deleted.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/bitmap.h

index 4cad1b4d6c6a8f544045ba83652a4f89a2ec31d1..451edcfc5907223b31eb154a41d01cbe079f9988 100644 (file)
@@ -959,10 +959,10 @@ class auto_bitmap
 
  private:
   // Prevent making a copy that references our bitmap.
-  auto_bitmap (const auto_bitmap &);
-  auto_bitmap &operator = (const auto_bitmap &);
-  auto_bitmap (auto_bitmap &&);
-  auto_bitmap &operator = (auto_bitmap &&);
+  auto_bitmap (const auto_bitmap &) = delete;
+  auto_bitmap &operator = (const auto_bitmap &) = delete;
+  auto_bitmap (auto_bitmap &&) = delete;
+  auto_bitmap &operator = (auto_bitmap &&) = delete;
 
   bitmap_head m_bits;
 };