]> git.stg.codes - stg.git/blobdiff - include/stg/noncopyable.h
Headers moved to subdir stg
[stg.git] / include / stg / noncopyable.h
diff --git a/include/stg/noncopyable.h b/include/stg/noncopyable.h
new file mode 100644 (file)
index 0000000..3d4c53b
--- /dev/null
@@ -0,0 +1,14 @@
+#ifndef __NONCOPYABLE_H__
+#define __NONCOPYABLE_H__
+
+class NONCOPYABLE
+{
+protected:
+    NONCOPYABLE() {}
+    virtual ~NONCOPYABLE() {}
+private:  // emphasize the following members are private
+    NONCOPYABLE(const NONCOPYABLE &);
+    const NONCOPYABLE & operator=(const NONCOPYABLE &);
+};
+
+#endif