Sprout/sprout/utility/noncopyable.hpp

31 lines
1.1 KiB
C++
Raw Normal View History

2013-08-08 09:54:33 +00:00
/*=============================================================================
2016-02-25 09:48:28 +00:00
Copyright (c) 2011-2016 Bolero MURAKAMI
2013-08-08 09:54:33 +00:00
https://github.com/bolero-MURAKAMI/Sprout
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/
2012-10-10 15:15:34 +00:00
#ifndef SPROUT_UTILITY_NONCOPYABLE_HPP
#define SPROUT_UTILITY_NONCOPYABLE_HPP
#include <sprout/config.hpp>
namespace sprout {
2014-11-28 07:19:07 +00:00
namespace noncopyable_detail {
2012-10-10 15:15:34 +00:00
class noncopyable {
2012-12-17 14:10:23 +00:00
protected:
SPROUT_CONSTEXPR noncopyable() SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL
~noncopyable() SPROUT_DEFAULTED_DESTRUCTOR_DECL
private:
noncopyable(noncopyable const&) SPROUT_DELETED_FUNCTION_DECL
noncopyable& operator=(noncopyable const&) SPROUT_DELETED_FUNCTION_DECL
2012-10-10 15:15:34 +00:00
};
2014-11-28 07:19:07 +00:00
} // namespace noncopyable_detail
2012-10-10 15:15:34 +00:00
//
// noncopyable
//
2014-11-28 07:19:07 +00:00
typedef sprout::noncopyable_detail::noncopyable noncopyable;
2012-10-10 15:15:34 +00:00
} // namespace sprout
#endif // #ifndef SPROUT_UTILITY_NONCOPYABLE_HPP