mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-10 14:39:01 +01:00
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
|
#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
|
// An inheritable class to disallow the copy constructor and operator= functions
|
||||||
class NonCopyable
|
class NonCopyable
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
NonCopyable() {}
|
NonCopyable() {}
|
||||||
private:
|
NonCopyable(const NonCopyable&&) {}
|
||||||
NonCopyable(const NonCopyable&);
|
void operator=(const NonCopyable&&) {}
|
||||||
void operator=(const NonCopyable&);
|
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
#include "CommonTypes.h"
|
#include "CommonTypes.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user