Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.)
  • Loading branch information
comex committed Aug 31, 2013
1 parent c497d62 commit 4d6d4a9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Source/Core/Common/Src/Common.h
Expand Up @@ -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"
Expand Down

0 comments on commit 4d6d4a9

Please sign in to comment.