diff --git a/modules/juce_audio_basics/midi/juce_MidiBuffer.h b/modules/juce_audio_basics/midi/juce_MidiBuffer.h index 27e86c7cc0..8344a5ed84 100644 --- a/modules/juce_audio_basics/midi/juce_MidiBuffer.h +++ b/modules/juce_audio_basics/midi/juce_MidiBuffer.h @@ -177,9 +177,6 @@ public: /** Creates a copy of an iterator. */ Iterator (const Iterator&) = default; - // VS2013 requires this, even if it's unused. - Iterator& operator= (const Iterator&) = delete; - /** Destructor. */ ~Iterator() noexcept; diff --git a/modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.cpp b/modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.cpp index 35714a3dcd..aeccf1983f 100644 --- a/modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.cpp +++ b/modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.cpp @@ -37,10 +37,7 @@ struct AudioVisualiserComponent::ChannelInfo void clear() noexcept { - // VS2013 doesn't like {} here... - for (auto& l : levels) - l = Range(); - + levels.fill ({}); value = {}; subSample = 0; } diff --git a/modules/juce_core/containers/juce_SortedSet.h b/modules/juce_core/containers/juce_SortedSet.h index f73f180187..b3f7905ff9 100644 --- a/modules/juce_core/containers/juce_SortedSet.h +++ b/modules/juce_core/containers/juce_SortedSet.h @@ -64,15 +64,13 @@ public: SortedSet (const SortedSet&) = default; /** Creates a copy of another set. */ - // VS2013 doesn't allow defaulted noexcept constructors. - SortedSet (SortedSet&& other) noexcept : data (std::move (other.data)) {} + SortedSet (SortedSet&&) noexcept = default; /** Makes a copy of another set. */ SortedSet& operator= (const SortedSet&) = default; /** Makes a copy of another set. */ - // VS2013 doesn't allow defaulted noexcept constructors. - SortedSet& operator= (SortedSet&& other) noexcept { data = std::move (other.data); return *this; } + SortedSet& operator= (SortedSet&&) noexcept = default; /** Destructor. */ ~SortedSet() = default; diff --git a/modules/juce_core/containers/juce_Variant.h b/modules/juce_core/containers/juce_Variant.h index e4e2c69433..e115d770bb 100644 --- a/modules/juce_core/containers/juce_Variant.h +++ b/modules/juce_core/containers/juce_Variant.h @@ -49,9 +49,6 @@ public: { NativeFunctionArgs (const var& thisObject, const var* args, int numArgs) noexcept; - // Suppress a VS2013 compiler warning - NativeFunctionArgs& operator= (const NativeFunctionArgs&) = delete; - const var& thisObject; const var* arguments; int numArguments; diff --git a/modules/juce_core/maths/juce_NormalisableRange.h b/modules/juce_core/maths/juce_NormalisableRange.h index 0dbcd5c218..eb2c8d9e83 100644 --- a/modules/juce_core/maths/juce_NormalisableRange.h +++ b/modules/juce_core/maths/juce_NormalisableRange.h @@ -44,32 +44,8 @@ public: NormalisableRange (const NormalisableRange&) = default; NormalisableRange& operator= (const NormalisableRange&) = default; - - // VS2013 can't default move constructors - NormalisableRange (NormalisableRange&& other) - : start (other.start), end (other.end), - interval (other.interval), skew (other.skew), - symmetricSkew (other.symmetricSkew), - convertFrom0To1Function (std::move (other.convertFrom0To1Function)), - convertTo0To1Function (std::move (other.convertTo0To1Function)), - snapToLegalValueFunction (std::move (other.snapToLegalValueFunction)) - { - } - - // VS2013 can't default move assignments - NormalisableRange& operator= (NormalisableRange&& other) - { - start = other.start; - end = other.end; - interval = other.interval; - skew = other.skew; - symmetricSkew = other.symmetricSkew; - convertFrom0To1Function = std::move (other.convertFrom0To1Function); - convertTo0To1Function = std::move (other.convertTo0To1Function); - snapToLegalValueFunction = std::move (other.snapToLegalValueFunction); - - return *this; - } + NormalisableRange (NormalisableRange&&) = default; + NormalisableRange& operator= (NormalisableRange&&) = default; /** Creates a NormalisableRange with a given range, interval and skew factor. */ NormalisableRange (ValueType rangeStart, diff --git a/modules/juce_core/network/juce_URL.cpp b/modules/juce_core/network/juce_URL.cpp index b518bf36c9..72d2536ecd 100644 --- a/modules/juce_core/network/juce_URL.cpp +++ b/modules/juce_core/network/juce_URL.cpp @@ -209,34 +209,6 @@ void URL::init() URL::URL (const String& u, int) : url (u) {} -URL::URL (URL&& other) - : url (std::move (other.url)), - postData (std::move (other.postData)), - parameterNames (std::move (other.parameterNames)), - parameterValues (std::move (other.parameterValues)), - filesToUpload (std::move (other.filesToUpload)) - #if JUCE_IOS - , bookmark (std::move (other.bookmark)) - #endif -{ -} - -URL& URL::operator= (URL&& other) -{ - url = std::move (other.url); - postData = std::move (other.postData); - parameterNames = std::move (other.parameterNames); - parameterValues = std::move (other.parameterValues); - filesToUpload = std::move (other.filesToUpload); - #if JUCE_IOS - bookmark = std::move (other.bookmark); - #endif - - return *this; -} - -URL::~URL() {} - URL URL::createWithoutParsing (const String& u) { return URL (u, 0); @@ -705,10 +677,6 @@ InputStream* URL::createInputStream (bool usePostCommand, OpenStreamProgressCallback* callback; void* const data; - - // workaround a MSVC 2013 compiler warning - ProgressCallbackCaller (const ProgressCallbackCaller& o) : callback (o.callback), data (o.data) { jassertfalse; } - ProgressCallbackCaller& operator= (const ProgressCallbackCaller&) { jassertfalse; return *this; } }; std::unique_ptr callbackCaller diff --git a/modules/juce_core/network/juce_URL.h b/modules/juce_core/network/juce_URL.h index 2cb72df920..8660339514 100644 --- a/modules/juce_core/network/juce_URL.h +++ b/modules/juce_core/network/juce_URL.h @@ -50,16 +50,14 @@ public: URL (const URL&) = default; URL& operator= (const URL&) = default; - - // VS2013 can't default move constructors and assignments - URL (URL&&); - URL& operator= (URL&&); + URL (URL&&) = default; + URL& operator= (URL&&) = default; /** Creates URL referring to a local file on your disk using the file:// scheme. */ explicit URL (File); /** Destructor. */ - ~URL(); + ~URL() = default; /** Compares two URLs. All aspects of the URLs must be identical for them to match, including any parameters, diff --git a/modules/juce_core/system/juce_CompilerSupport.h b/modules/juce_core/system/juce_CompilerSupport.h index 9d1aae4c3f..e9861cfb44 100644 --- a/modules/juce_core/system/juce_CompilerSupport.h +++ b/modules/juce_core/system/juce_CompilerSupport.h @@ -38,8 +38,6 @@ #error "JUCE requires that GCC has C++11 compatibility enabled" #endif - #define JUCE_COMPILER_SUPPORTS_NOEXCEPT 1 - #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 #define JUCE_HAS_CONSTEXPR 1 #endif @@ -63,7 +61,6 @@ #error "JUCE requires Clang 3.3 or later" #endif - #define JUCE_COMPILER_SUPPORTS_NOEXCEPT 1 #define JUCE_HAS_CONSTEXPR 1 #ifndef JUCE_COMPILER_SUPPORTS_ARC @@ -85,18 +82,11 @@ // MSVC #if JUCE_MSVC - #if _MSC_VER < 1800 // VS2013 - #error "JUCE requires Visual Studio 2013 or later" + #if _MSC_VER < 1900 // VS2015 + #error "JUCE requires Visual Studio 2015 or later" #endif - #if _MSC_VER >= 1900 // VS2015 - #define JUCE_COMPILER_SUPPORTS_NOEXCEPT 1 - #define JUCE_HAS_CONSTEXPR 1 - #else - #define _ALLOW_KEYWORD_MACROS 1 // prevent a warning - #undef noexcept - #define noexcept throw() - #endif + #define JUCE_HAS_CONSTEXPR 1 #ifndef JUCE_EXCEPTIONS_DISABLED #if ! _CPPUNWIND @@ -121,12 +111,6 @@ #define JUCE_CONSTEXPR #endif -#if JUCE_MSVC && _MSC_VER < 1900 - #define JUCE_REF_QUALIFIER -#else - #define JUCE_REF_QUALIFIER & -#endif - #if (! JUCE_MSVC) && (! JUCE_CXX14_IS_AVAILABLE) namespace std { @@ -143,5 +127,6 @@ namespace std #define JUCE_COMPILER_SUPPORTS_OVERRIDE_AND_FINAL 1 #define JUCE_COMPILER_SUPPORTS_VARIADIC_TEMPLATES 1 #define JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS 1 + #define JUCE_COMPILER_SUPPORTS_NOEXCEPT 1 #define JUCE_DELETED_FUNCTION = delete #endif diff --git a/modules/juce_cryptography/hashing/juce_MD5.cpp b/modules/juce_cryptography/hashing/juce_MD5.cpp index a48f34a4f4..f15bd271b2 100644 --- a/modules/juce_cryptography/hashing/juce_MD5.cpp +++ b/modules/juce_cryptography/hashing/juce_MD5.cpp @@ -29,13 +29,6 @@ namespace juce struct MD5Generator { - MD5Generator() - { - // have to copy this data manually, as VS2013 doesn't support member array initialisers - const uint32_t initialState[4] = { 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476 }; - memcpy (state, initialState, sizeof (state)); - } - void processBlock (const void* data, size_t dataSize) noexcept { auto bufferPos = ((count[0] >> 3) & 0x3f); @@ -141,7 +134,7 @@ struct MD5Generator private: uint8_t buffer[64] = {}; - uint32_t state[4]; + uint32_t state[4] = { 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476 }; uint32_t count[2] = {}; static void copyWithEndiannessConversion (void* output, const void* input, size_t numBytes) noexcept diff --git a/modules/juce_cryptography/hashing/juce_SHA256.cpp b/modules/juce_cryptography/hashing/juce_SHA256.cpp index f17c21767a..6a952932fe 100644 --- a/modules/juce_cryptography/hashing/juce_SHA256.cpp +++ b/modules/juce_cryptography/hashing/juce_SHA256.cpp @@ -29,14 +29,6 @@ namespace juce struct SHA256Processor { - SHA256Processor() - { - // have to copy this data manually, as VS2013 doesn't support member array initialisers - const uint32_t initialState[8] = { 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, - 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 }; - memcpy (state, initialState, sizeof (state)); - } - // expects 64 bytes of data void processFullBlock (const void* data) noexcept { @@ -143,7 +135,8 @@ struct SHA256Processor } private: - uint32_t state[8]; + uint32_t state[8] = { 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, + 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 }; uint64_t length = 0; static inline uint32_t rotate (uint32_t x, uint32_t y) noexcept { return (x >> y) | (x << (32 - y)); } diff --git a/modules/juce_cryptography/juce_cryptography.h b/modules/juce_cryptography/juce_cryptography.h index 109497a2d2..29b0539f22 100644 --- a/modules/juce_cryptography/juce_cryptography.h +++ b/modules/juce_cryptography/juce_cryptography.h @@ -54,10 +54,6 @@ //============================================================================== #include -#if JUCE_MSVC - #pragma warning (disable: 4351) // this is a dodgy VC2013 warning about C++11 behaviour -#endif - #include "encryption/juce_BlowFish.h" #include "encryption/juce_Primes.h" #include "encryption/juce_RSAKey.h" diff --git a/modules/juce_events/messages/juce_MessageManager.cpp b/modules/juce_events/messages/juce_MessageManager.cpp index bc0d444499..908e203252 100644 --- a/modules/juce_events/messages/juce_MessageManager.cpp +++ b/modules/juce_events/messages/juce_MessageManager.cpp @@ -273,8 +273,8 @@ bool MessageManager::existsAndIsCurrentThread() noexcept struct MessageManager::Lock::BlockingMessage : public MessageManager::MessageBase { BlockingMessage (const MessageManager::Lock* parent) noexcept - // need a const_cast here as VS2013 doesn't like a const pointer to be in an atomic - : owner (const_cast (parent)) {} + : owner (parent) + {} void messageCallback() override { @@ -289,7 +289,7 @@ struct MessageManager::Lock::BlockingMessage : public MessageManager::MessageB } CriticalSection ownerCriticalSection; - Atomic owner; + Atomic owner; WaitableEvent releaseEvent; JUCE_DECLARE_NON_COPYABLE (BlockingMessage) diff --git a/modules/juce_graphics/fonts/juce_AttributedString.cpp b/modules/juce_graphics/fonts/juce_AttributedString.cpp index ff36fd151f..829b3c4c53 100644 --- a/modules/juce_graphics/fonts/juce_AttributedString.cpp +++ b/modules/juce_graphics/fonts/juce_AttributedString.cpp @@ -135,49 +135,12 @@ namespace } //============================================================================== -AttributedString::Attribute::Attribute (Attribute&& other) noexcept - : range (other.range), - font (std::move (other.font)), - colour (other.colour) -{ -} - -AttributedString::Attribute& AttributedString::Attribute::operator= (Attribute&& other) noexcept -{ - range = other.range; - font = std::move (other.font); - colour = other.colour; - return *this; -} - AttributedString::Attribute::Attribute (Range r, const Font& f, Colour c) noexcept : range (r), font (f), colour (c) { } //============================================================================== -AttributedString::AttributedString (AttributedString&& other) noexcept - : text (std::move (other.text)), - lineSpacing (other.lineSpacing), - justification (other.justification), - wordWrap (other.wordWrap), - readingDirection (other.readingDirection), - attributes (std::move (other.attributes)) -{ -} - -AttributedString& AttributedString::operator= (AttributedString&& other) noexcept -{ - text = std::move (other.text); - lineSpacing = other.lineSpacing; - justification = other.justification; - wordWrap = other.wordWrap; - readingDirection = other.readingDirection; - attributes = std::move (other.attributes); - - return *this; -} - void AttributedString::setText (const String& newText) { auto newLength = newText.length(); diff --git a/modules/juce_graphics/fonts/juce_AttributedString.h b/modules/juce_graphics/fonts/juce_AttributedString.h index 5dd30979c1..0854df38a1 100644 --- a/modules/juce_graphics/fonts/juce_AttributedString.h +++ b/modules/juce_graphics/fonts/juce_AttributedString.h @@ -50,10 +50,8 @@ public: AttributedString (const AttributedString&) = default; AttributedString& operator= (const AttributedString&) = default; - - // VS2013 can't default move constructors and assignments - AttributedString (AttributedString&&) noexcept; - AttributedString& operator= (AttributedString&&) noexcept; + AttributedString (AttributedString&&) noexcept = default; + AttributedString& operator= (AttributedString&&) noexcept = default; //============================================================================== /** Returns the complete text of this attributed string. */ @@ -154,10 +152,8 @@ public: Attribute (const Attribute&) = default; Attribute& operator= (const Attribute&) = default; - - // VS2013 can't default move constructors and assignments - Attribute (Attribute&&) noexcept; - Attribute& operator= (Attribute&&) noexcept; + Attribute (Attribute&&) noexcept = default; + Attribute& operator= (Attribute&&) noexcept = default; /** Creates an attribute that specifies the font and colour for a range of characters. */ Attribute (Range range, const Font& font, Colour colour) noexcept; diff --git a/modules/juce_graphics/fonts/juce_GlyphArrangement.cpp b/modules/juce_graphics/fonts/juce_GlyphArrangement.cpp index b96a893b46..de5c1dca8d 100644 --- a/modules/juce_graphics/fonts/juce_GlyphArrangement.cpp +++ b/modules/juce_graphics/fonts/juce_GlyphArrangement.cpp @@ -39,26 +39,6 @@ PositionedGlyph::PositionedGlyph (const Font& font_, juce_wchar character_, int { } -PositionedGlyph::PositionedGlyph (PositionedGlyph&& other) noexcept - : font (std::move (other.font)), - character (other.character), glyph (other.glyph), - x (other.x), y (other.y), w (other.w), whitespace (other.whitespace) -{ -} - -PositionedGlyph& PositionedGlyph::operator= (PositionedGlyph&& other) noexcept -{ - font = std::move (other.font); - character = other.character; - glyph = other.glyph; - x = other.x; - y = other.y; - w = other.w; - whitespace = other.whitespace; - - return *this; -} - PositionedGlyph::~PositionedGlyph() {} static inline void drawGlyphWithFont (Graphics& g, int glyph, const Font& font, AffineTransform t) @@ -128,20 +108,6 @@ GlyphArrangement::GlyphArrangement() glyphs.ensureStorageAllocated (128); } -GlyphArrangement::GlyphArrangement (GlyphArrangement&& other) - : glyphs (std::move (other.glyphs)) -{ -} - -GlyphArrangement& GlyphArrangement::operator= (GlyphArrangement&& other) -{ - glyphs = std::move (other.glyphs); - - return *this; -} - -GlyphArrangement::~GlyphArrangement() {} - //============================================================================== void GlyphArrangement::clear() { diff --git a/modules/juce_graphics/fonts/juce_GlyphArrangement.h b/modules/juce_graphics/fonts/juce_GlyphArrangement.h index b5f798b7d9..8e29d40de2 100644 --- a/modules/juce_graphics/fonts/juce_GlyphArrangement.h +++ b/modules/juce_graphics/fonts/juce_GlyphArrangement.h @@ -50,10 +50,8 @@ public: PositionedGlyph (const PositionedGlyph&) = default; PositionedGlyph& operator= (const PositionedGlyph&) = default; - - // VS2013 can't default move constructors and assignments - PositionedGlyph (PositionedGlyph&&) noexcept; - PositionedGlyph& operator= (PositionedGlyph&&) noexcept; + PositionedGlyph (PositionedGlyph&&) noexcept = default; + PositionedGlyph& operator= (PositionedGlyph&&) noexcept = default; ~PositionedGlyph(); @@ -132,13 +130,11 @@ public: GlyphArrangement (const GlyphArrangement&) = default; GlyphArrangement& operator= (const GlyphArrangement&) = default; - - // VS2013 can't default move constructors and assignmants - GlyphArrangement (GlyphArrangement&&); - GlyphArrangement& operator= (GlyphArrangement&&); + GlyphArrangement (GlyphArrangement&&) = default; + GlyphArrangement& operator= (GlyphArrangement&&) = default; /** Destructor. */ - ~GlyphArrangement(); + ~GlyphArrangement() = default; //============================================================================== /** Returns the total number of glyphs in the arrangement. */ diff --git a/modules/juce_gui_basics/menus/juce_PopupMenu.cpp b/modules/juce_gui_basics/menus/juce_PopupMenu.cpp index 3d0aba587c..2e2c8f4414 100644 --- a/modules/juce_gui_basics/menus/juce_PopupMenu.cpp +++ b/modules/juce_gui_basics/menus/juce_PopupMenu.cpp @@ -1309,47 +1309,8 @@ void PopupMenu::clear() PopupMenu::Item::Item() = default; PopupMenu::Item::Item (String t) : text (std::move (t)), itemID (-1) {} -#if JUCE_MSVC && _MSC_VER < 1900 // tedious VC2013 workaround -PopupMenu::Item::Item (Item&& other) - : text (std::move (other.text)), - itemID (other.itemID), - action (std::move (other.action)), - subMenu (std::move (other.subMenu)), - image (std::move (other.image)), - customComponent (std::move (other.customComponent)), - customCallback (std::move (other.customCallback)), - commandManager (other.commandManager), - shortcutKeyDescription (std::move (other.shortcutKeyDescription)), - colour (other.colour), - isEnabled (other.isEnabled), - isTicked (other.isTicked), - isSeparator (other.isSeparator), - isSectionHeader (other.isSectionHeader) -{ -} - -PopupMenu::Item& PopupMenu::Item::operator= (Item&& other) -{ - text = std::move (other.text); - itemID = other.itemID; - action = std::move (other.action); - subMenu = std::move (other.subMenu); - image = std::move (other.image); - customComponent = std::move (other.customComponent); - customCallback = std::move (other.customCallback); - commandManager = other.commandManager; - shortcutKeyDescription = std::move (other.shortcutKeyDescription); - colour = other.colour; - isEnabled = other.isEnabled; - isTicked = other.isTicked; - isSeparator = other.isSeparator; - isSectionHeader = other.isSectionHeader; - return *this; -} -#else PopupMenu::Item::Item (Item&&) = default; PopupMenu::Item& PopupMenu::Item::operator= (Item&&) = default; -#endif PopupMenu::Item::Item (const Item& other) : text (other.text), @@ -1388,43 +1349,42 @@ PopupMenu::Item& PopupMenu::Item::operator= (const Item& other) return *this; } -PopupMenu::Item& PopupMenu::Item::setTicked (bool shouldBeTicked) JUCE_REF_QUALIFIER noexcept +PopupMenu::Item& PopupMenu::Item::setTicked (bool shouldBeTicked) & noexcept { isTicked = shouldBeTicked; return *this; } -PopupMenu::Item& PopupMenu::Item::setEnabled (bool shouldBeEnabled) JUCE_REF_QUALIFIER noexcept +PopupMenu::Item& PopupMenu::Item::setEnabled (bool shouldBeEnabled) & noexcept { isEnabled = shouldBeEnabled; return *this; } -PopupMenu::Item& PopupMenu::Item::setAction (std::function newAction) JUCE_REF_QUALIFIER noexcept +PopupMenu::Item& PopupMenu::Item::setAction (std::function newAction) & noexcept { action = std::move (newAction); return *this; } -PopupMenu::Item& PopupMenu::Item::setID (int newID) JUCE_REF_QUALIFIER noexcept +PopupMenu::Item& PopupMenu::Item::setID (int newID) & noexcept { itemID = newID; return *this; } -PopupMenu::Item& PopupMenu::Item::setColour (Colour newColour) JUCE_REF_QUALIFIER noexcept +PopupMenu::Item& PopupMenu::Item::setColour (Colour newColour) & noexcept { colour = newColour; return *this; } -PopupMenu::Item& PopupMenu::Item::setCustomComponent (ReferenceCountedObjectPtr comp) JUCE_REF_QUALIFIER noexcept +PopupMenu::Item& PopupMenu::Item::setCustomComponent (ReferenceCountedObjectPtr comp) & noexcept { customComponent = comp; return *this; } -#if ! (JUCE_MSVC && _MSC_VER < 1900) // Gah.. no ref-qualifiers in VC2013... PopupMenu::Item&& PopupMenu::Item::setTicked (bool shouldBeTicked) && noexcept { isTicked = shouldBeTicked; @@ -1460,7 +1420,6 @@ PopupMenu::Item&& PopupMenu::Item::setCustomComponent (ReferenceCountedObjectPtr customComponent = comp; return std::move (*this); } -#endif void PopupMenu::addItem (Item newItem) { diff --git a/modules/juce_gui_basics/menus/juce_PopupMenu.h b/modules/juce_gui_basics/menus/juce_PopupMenu.h index 4a8c9584ba..2ebc3a7c3d 100644 --- a/modules/juce_gui_basics/menus/juce_PopupMenu.h +++ b/modules/juce_gui_basics/menus/juce_PopupMenu.h @@ -181,19 +181,18 @@ public: bool isSectionHeader = false; /** Sets the isTicked flag (and returns a reference to this item to allow chaining). */ - Item& setTicked (bool shouldBeTicked = true) JUCE_REF_QUALIFIER noexcept; + Item& setTicked (bool shouldBeTicked = true) & noexcept; /** Sets the isEnabled flag (and returns a reference to this item to allow chaining). */ - Item& setEnabled (bool shouldBeEnabled) JUCE_REF_QUALIFIER noexcept; + Item& setEnabled (bool shouldBeEnabled) & noexcept; /** Sets the action property (and returns a reference to this item to allow chaining). */ - Item& setAction (std::function action) JUCE_REF_QUALIFIER noexcept; + Item& setAction (std::function action) & noexcept; /** Sets the itemID property (and returns a reference to this item to allow chaining). */ - Item& setID (int newID) JUCE_REF_QUALIFIER noexcept; + Item& setID (int newID) & noexcept; /** Sets the colour property (and returns a reference to this item to allow chaining). */ - Item& setColour (Colour) JUCE_REF_QUALIFIER noexcept; + Item& setColour (Colour) & noexcept; /** Sets the customComponent property (and returns a reference to this item to allow chaining). */ - Item& setCustomComponent (ReferenceCountedObjectPtr customComponent) JUCE_REF_QUALIFIER noexcept; + Item& setCustomComponent (ReferenceCountedObjectPtr customComponent) & noexcept; - #if ! (JUCE_MSVC && _MSC_VER < 1900) // Gah.. no ref-qualifiers in VC2013... /** Sets the isTicked flag (and returns a reference to this item to allow chaining). */ Item&& setTicked (bool shouldBeTicked = true) && noexcept; /** Sets the isEnabled flag (and returns a reference to this item to allow chaining). */ @@ -206,7 +205,6 @@ public: Item&& setColour (Colour) && noexcept; /** Sets the customComponent property (and returns a reference to this item to allow chaining). */ Item&& setCustomComponent (ReferenceCountedObjectPtr customComponent) && noexcept; - #endif }; /** Adds an item to the menu. diff --git a/modules/juce_gui_basics/native/juce_MultiTouchMapper.h b/modules/juce_gui_basics/native/juce_MultiTouchMapper.h index 35bd4e3042..aed39fb205 100644 --- a/modules/juce_gui_basics/native/juce_MultiTouchMapper.h +++ b/modules/juce_gui_basics/native/juce_MultiTouchMapper.h @@ -93,18 +93,8 @@ private: TouchInfo (const TouchInfo&) = default; TouchInfo& operator= (const TouchInfo&) = default; - - // VS2013 can't default move constructors - TouchInfo (TouchInfo&& other) noexcept : touchId (other.touchId), owner (other.owner) {} - - // VS2013 can't default move assignments - TouchInfo& operator= (TouchInfo&& other) noexcept - { - touchId = other.touchId; - owner = other.owner; - - return *this; - } + TouchInfo (TouchInfo&&) noexcept = default; + TouchInfo& operator= (TouchInfo&&) noexcept = default; IDType touchId; ComponentPeer* owner; diff --git a/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp b/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp index f8fc10b8da..aacb50bd06 100644 --- a/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp +++ b/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp @@ -31,9 +31,6 @@ struct MarkerListScope : public Expression::Scope { MarkerListScope (Component& comp) : component (comp) {} - // Suppress a VS2013 compiler warning - MarkerListScope& operator= (const MarkerListScope&) = delete; - Expression getSymbolValue (const String& symbol) const override { switch (RelativeCoordinate::StandardStrings::getTypeOf (symbol)) diff --git a/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.h b/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.h index a3aecb8d2d..517519be81 100644 --- a/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.h +++ b/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.h @@ -60,9 +60,6 @@ public: public: ComponentScope (Component&); - // Suppress a VS2013 compiler warning - ComponentScope& operator= (const ComponentScope&) = delete; - Expression getSymbolValue (const String& symbol) const override; void visitRelativeScope (const String& scopeName, Visitor&) const override; String getScopeUID() const override; diff --git a/modules/juce_gui_basics/widgets/juce_TextEditor.cpp b/modules/juce_gui_basics/widgets/juce_TextEditor.cpp index 2099a9bc70..4dbd362495 100644 --- a/modules/juce_gui_basics/widgets/juce_TextEditor.cpp +++ b/modules/juce_gui_basics/widgets/juce_TextEditor.cpp @@ -74,14 +74,7 @@ public: } UniformTextSection (const UniformTextSection&) = default; - - // VS2013 can't default move constructors - UniformTextSection (UniformTextSection&& other) - : font (std::move (other.font)), - colour (other.colour), - atoms (std::move (other.atoms)) - { - } + UniformTextSection (UniformTextSection&&) = default; UniformTextSection& operator= (const UniformTextSection&) = delete; diff --git a/modules/juce_gui_extra/misc/juce_ColourSelector.cpp b/modules/juce_gui_extra/misc/juce_ColourSelector.cpp index 56e5d685d5..976b598226 100644 --- a/modules/juce_gui_extra/misc/juce_ColourSelector.cpp +++ b/modules/juce_gui_extra/misc/juce_ColourSelector.cpp @@ -327,8 +327,10 @@ ColourSelector::ColourSelector (int sectionsToShow, int edge, int gapAroundColou sliders[3]->setVisible ((flags & showAlphaChannel) != 0); + // VS2015 needs some scoping braces around this if statement to + // avoid a compiler bug. for (auto& slider : sliders) - { // braces needed here to avoid a VS2013 compiler bug + { slider->onValueChange = [this] { changeColour(); }; } }