浏览代码

Delete copy constructor and operator= for Dynamic

This would mess up reference counting and should not be allowed
(it could be implemented correctly, but it would not be efficient
and we do not need it).

Gbp-Dch: ignore
Julian Andres Klode 10 年之前
父节点
当前提交
96f66f82cf
共有 1 个文件被更改,包括 5 次插入 和 0 次删除
  1. 5 0
      apt-pkg/pkgcachegen.h

+ 5 - 0
apt-pkg/pkgcachegen.h

@@ -93,6 +93,11 @@ class APT_HIDDEN pkgCacheGenerator					/*{{{*/
       ~Dynamic() {
       ~Dynamic() {
 	 toReMap.pop_back();
 	 toReMap.pop_back();
       }
       }
+
+#if __cplusplus >= 201103L
+      Dynamic(const Dynamic&) = delete;
+      void operator=(const Dynamic&) = delete;
+#endif
    };
    };
 
 
    protected:
    protected: