make it really clear that wangle/rx is deprecated
[folly.git] / folly / AtomicLinkedList.h
index 7e9db6bd2117f8ef04d84198caf387cb7b150741..eca8de16d9b32450cdab81876ae1c3834c6c9efe 100644 (file)
@@ -44,6 +44,20 @@ template <class T, AtomicLinkedListHook<T> T::* HookMember>
 class AtomicLinkedList {
  public:
   AtomicLinkedList() {}
+  AtomicLinkedList(const AtomicLinkedList&) = delete;
+  AtomicLinkedList& operator=(const AtomicLinkedList&) = delete;
+  AtomicLinkedList(AtomicLinkedList&& other) noexcept {
+    auto tmp = other.head_.load();
+    other.head_ = head_.load();
+    head_ = tmp;
+  }
+  AtomicLinkedList& operator=(AtomicLinkedList&& other) noexcept {
+    auto tmp = other.head_.load();
+    other.head_ = head_.load();
+    head_ = tmp;
+
+    return *this;
+  }
 
   /**
    * Note: list must be empty on destruction.