libcruft-util/nocopy.hpp

28 lines
669 B
C++
Raw Normal View History

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
namespace cruft {
class nocopy {
protected:
nocopy () { ; }
~nocopy () { ; }
2011-05-23 17:18:52 +10:00
private:
2016-03-17 18:10:27 +11:00
nocopy (const nocopy & ) = delete;
nocopy ( nocopy &&) = delete;
2016-03-17 18:10:27 +11:00
nocopy& operator= (const nocopy & ) = delete;
nocopy& operator= ( nocopy &&) = delete;
};
}
2011-05-23 17:18:52 +10:00
#endif