1 /*---------------------------------------------------------------------------* 2 3 Copyright (C) 2013-2014 Nintendo. All rights reserved. 4 5 These coded instructions, statements, and computer programs contain 6 proprietary information of Nintendo of America Inc. and/or Nintendo 7 Company Ltd., and are protected by Federal copyright law. They may 8 not be disclosed to third parties or copied or duplicated in any form, 9 in whole or in part, without the prior written consent of Nintendo. 10 11 *---------------------------------------------------------------------------*/ 12 13 #ifndef NN_EC_NON_COPYABLE_H_ 14 #define NN_EC_NON_COPYABLE_H_ 15 16 namespace nn { namespace ec { 17 18 //! @addtogroup nn_ec_class 19 //! @{ 20 21 /*! 22 @brief Represents a non-copyable object. 23 24 Objects of classes that inherit this class cannot use the copy constructor or be assigned. 25 */ 26 template <class T> class NonCopyable 27 { 28 protected: NonCopyable()29 NonCopyable() {} ~NonCopyable()30 ~NonCopyable() {} 31 32 private: 33 NonCopyable(const NonCopyable&); 34 NonCopyable& operator=(const NonCopyable&); 35 T& operator=(const T&); 36 }; 37 38 //! @} 39 40 }} // namespace nn::ec 41 42 #endif // NN_EC_NON_COPYABLE_H_ 43