2011-05-23 17:18:52 +10:00
|
|
|
/*
|
2018-08-04 15:14:06 +10:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2011-05-23 17:18:52 +10:00
|
|
|
*
|
2012-04-23 13:06:41 +10:00
|
|
|
* Copyright 2010 Danny Robson <danny@nerdcruft.net>
|
2011-05-23 17:18:52 +10:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __NOCOPY_HPP
|
|
|
|
#define __NOCOPY_HPP
|
|
|
|
|
2018-08-05 14:42:02 +10:00
|
|
|
namespace cruft {
|
2011-10-07 21:58:16 +11:00
|
|
|
class nocopy {
|
2012-06-20 16:48:02 +10:00
|
|
|
protected:
|
|
|
|
nocopy () { ; }
|
|
|
|
~nocopy () { ; }
|
2011-05-23 17:18:52 +10:00
|
|
|
|
2011-10-07 21:58:16 +11:00
|
|
|
private:
|
2016-03-17 18:10:27 +11:00
|
|
|
nocopy (const nocopy & ) = delete;
|
|
|
|
nocopy ( nocopy &&) = delete;
|
2014-12-19 14:58:13 +11:00
|
|
|
|
2016-03-17 18:10:27 +11:00
|
|
|
nocopy& operator= (const nocopy & ) = delete;
|
|
|
|
nocopy& operator= ( nocopy &&) = delete;
|
2011-10-07 21:58:16 +11:00
|
|
|
};
|
|
|
|
}
|
2011-05-23 17:18:52 +10:00
|
|
|
|
|
|
|
#endif
|