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>
pull/427/head
Kim Kulling 2014-11-29 11:56:39 +01:00
parent 26ac1e2c72
commit 098ddd3a95
1 changed files with 4 additions and 0 deletions

View File

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