]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/thread.h
Make sure all classes have sensible copy semantics
[libs/core.git] / source / core / thread.h
index 7cf17b8d327ed3e84075bb4c247f4c5d16c4ff6f..6a17912fdc3c03e0d0904aeb768b8a40ee316212 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_CORE_THREAD_H_
 
 #include <string>
+#include "noncopyable.h"
 
 namespace Msp {
 
@@ -12,7 +13,7 @@ automatically started upon creation - you must manually call launch() instead.
 This is to allow initializing variables of the derived class before the thread
 is started.
 */
-class Thread
+class Thread: private NonCopyable
 {
 private:
        struct Private;
@@ -32,9 +33,6 @@ private:
 
 protected:
        Thread(const std::string & = std::string());
-private:
-       Thread(const Thread &);
-       Thread &operator=(const Thread &);
 public:
        virtual ~Thread();