make copy constructor and a assignment operator private to avoid misuse of helper class scope guard

Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>
This commit is contained in:
Kim Kulling
2014-11-29 11:56:39 +01:00
parent 26ac1e2c72
commit 098ddd3a95

View File

@@ -90,6 +90,10 @@ struct ScopeGuard
}
private:
// no copying allowed.
ScopeGuard( const ScopeGuard & );
ScopeGuard &operator = ( const ScopeGuard & );
T* obj;
bool mdismiss;
};