Make NonCopyable use rvalue references.
This is required to be able to move objects that inherit from it. (Note that this patch also #ifs out the class for the externals that include it yet are compiled in pre-C++11 mode. It shouldn't matter, since those externals don't use it.)
This commit is contained in:
parent
c497d62836
commit
4d6d4a97e4
|
@ -25,15 +25,20 @@ extern const char *netplay_dolphin_ver;
|
|||
|
||||
#define STACKALIGN
|
||||
|
||||
#if __cplusplus >= 201103 || defined(_MSC_VER) || defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
#define HAVE_CXX11_SYNTAX 1
|
||||
#endif
|
||||
|
||||
#if HAVE_CXX11_SYNTAX
|
||||
// An inheritable class to disallow the copy constructor and operator= functions
|
||||
class NonCopyable
|
||||
{
|
||||
protected:
|
||||
NonCopyable() {}
|
||||
private:
|
||||
NonCopyable(const NonCopyable&);
|
||||
void operator=(const NonCopyable&);
|
||||
NonCopyable(const NonCopyable&&) {}
|
||||
void operator=(const NonCopyable&&) {}
|
||||
};
|
||||
#endif
|
||||
|
||||
#include "Log.h"
|
||||
#include "CommonTypes.h"
|
||||
|
|
Loading…
Reference in New Issue