Browse Source

Added JUCE_DECLARE_NON_MOVEABLE macro

tags/2021-05-28
ed 4 years ago
parent
commit
b1253bfc74
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      modules/juce_core/system/juce_PlatformDefs.h

+ 9
- 1
modules/juce_core/system/juce_PlatformDefs.h View File

@@ -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.
*/


Loading…
Cancel
Save