From aa1cbafd1071bb10eff748f823a31a2ff31a956b Mon Sep 17 00:00:00 2001 From: jules Date: Mon, 29 Dec 2014 12:44:40 +0000 Subject: [PATCH] Fix for targeting older versions of OSX that don't support initializer_list --- .../juce_core/system/juce_CompilerSupport.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/modules/juce_core/system/juce_CompilerSupport.h b/modules/juce_core/system/juce_CompilerSupport.h index 5376a0c6ea..52cb15b258 100644 --- a/modules/juce_core/system/juce_CompilerSupport.h +++ b/modules/juce_core/system/juce_CompilerSupport.h @@ -74,13 +74,20 @@ #define JUCE_DELETED_FUNCTION = delete #endif - #if __has_feature (cxx_lambdas) \ - && ((JUCE_MAC && defined (MAC_OS_X_VERSION_10_8) && MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_8) \ - || (JUCE_IOS && defined (__IPHONE_7_0) && __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_0) \ - || ! (JUCE_MAC || JUCE_IOS)) + #if (JUCE_MAC && defined (MAC_OS_X_VERSION_10_8) && MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_8) \ + || (JUCE_IOS && defined (__IPHONE_7_0) && __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_0) \ + || ! (JUCE_MAC || JUCE_IOS) + #define JUCE_NOT_OSX10_8_OR_EARLIER 1 + #endif + + #if __has_feature (cxx_lambdas) && JUCE_NOT_OSX10_8_OR_EARLIER #define JUCE_COMPILER_SUPPORTS_LAMBDAS 1 #endif + #if __has_feature (cxx_generalized_initializers) && JUCE_NOT_OSX10_8_OR_EARLIER + #define JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS 1 + #endif + #ifndef JUCE_COMPILER_SUPPORTS_OVERRIDE_AND_FINAL #define JUCE_COMPILER_SUPPORTS_OVERRIDE_AND_FINAL 1 #endif @@ -89,10 +96,6 @@ #define JUCE_COMPILER_SUPPORTS_ARC 1 #endif -#if __has_feature (cxx_generalized_initializers) - #define JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS 1 -#endif - #endif //==============================================================================