diff --git a/modules/juce_core/system/juce_PlatformDefs.h b/modules/juce_core/system/juce_PlatformDefs.h index 43000cab6b..8df78273a4 100644 --- a/modules/juce_core/system/juce_PlatformDefs.h +++ b/modules/juce_core/system/juce_PlatformDefs.h @@ -190,7 +190,8 @@ namespace juce #define JUCE_STRINGIFY(item) JUCE_STRINGIFY_MACRO_HELPER (item) //============================================================================== -/** This is a shorthand macro for declaring stubs for a class's copy constructor and operator=. +/** This is a shorthand macro for deleting a class's copy constructor and + copy assignment operator. For example, instead of @code @@ -218,6 +219,13 @@ namespace juce className (const className&) = delete;\ className& operator= (const className&) = delete; +/** This is a shorthand macro for deleting a class's move constructor and + move assignment operator. +*/ +#define JUCE_DECLARE_NON_MOVEABLE(className) \ + className (className&&) = delete;\ + className& operator= (className&&) = delete; + /** This is a shorthand way of writing both a JUCE_DECLARE_NON_COPYABLE and JUCE_LEAK_DETECTOR macro for a class. */