Go to the documentation of this file.
29 #ifndef JUCE_COMPILERSUPPORT_H_INCLUDED
30 #define JUCE_COMPILERSUPPORT_H_INCLUDED
39 #if (__cplusplus >= 201103L || defined (__GXX_EXPERIMENTAL_CXX0X__)) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 405
40 #define JUCE_COMPILER_SUPPORTS_NOEXCEPT 1
41 #define JUCE_COMPILER_SUPPORTS_NULLPTR 1
42 #define JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS 1
43 #define JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS 1
44 #define JUCE_COMPILER_SUPPORTS_VARIADIC_TEMPLATES 1
46 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && ! defined (JUCE_COMPILER_SUPPORTS_OVERRIDE_AND_FINAL)
47 #define JUCE_COMPILER_SUPPORTS_OVERRIDE_AND_FINAL 1
50 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && ! defined (JUCE_DELETED_FUNCTION)
51 #define JUCE_DELETED_FUNCTION = delete
54 #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && ! defined (JUCE_COMPILER_SUPPORTS_LAMBDAS)
55 #define JUCE_COMPILER_SUPPORTS_LAMBDAS 1
61 #if JUCE_CLANG && defined (__has_feature)
62 #if __has_feature (cxx_nullptr)
63 #define JUCE_COMPILER_SUPPORTS_NULLPTR 1
66 #if __has_feature (cxx_noexcept)
67 #define JUCE_COMPILER_SUPPORTS_NOEXCEPT 1
70 #if __has_feature (cxx_rvalue_references)
71 #define JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS 1
74 #if __has_feature (cxx_deleted_functions)
75 #define JUCE_DELETED_FUNCTION = delete
78 #if __has_feature (cxx_lambdas) && (defined (_LIBCPP_VERSION) || ! (JUCE_MAC || JUCE_IOS))
79 #define JUCE_COMPILER_SUPPORTS_LAMBDAS 1
82 #if __has_feature (cxx_generalized_initializers) && (defined (_LIBCPP_VERSION) || ! (JUCE_MAC || JUCE_IOS))
83 #define JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS 1
86 #if __has_feature (cxx_variadic_templates)
87 #define JUCE_COMPILER_SUPPORTS_VARIADIC_TEMPLATES 1
90 #ifndef JUCE_COMPILER_SUPPORTS_OVERRIDE_AND_FINAL
91 #define JUCE_COMPILER_SUPPORTS_OVERRIDE_AND_FINAL 1
94 #ifndef JUCE_COMPILER_SUPPORTS_ARC
95 #define JUCE_COMPILER_SUPPORTS_ARC 1
104 #define JUCE_COMPILER_SUPPORTS_NULLPTR 1
105 #define JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS 1
109 #define JUCE_COMPILER_SUPPORTS_OVERRIDE_AND_FINAL 1
110 #define JUCE_COMPILER_SUPPORTS_LAMBDAS 1
114 #define JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS 1
115 #define JUCE_COMPILER_SUPPORTS_VARIADIC_TEMPLATES 1
116 #define JUCE_DELETED_FUNCTION = delete
120 #define JUCE_COMPILER_SUPPORTS_NOEXCEPT 1
127 #ifndef JUCE_DELETED_FUNCTION
133 #define JUCE_DELETED_FUNCTION
137 #if ! JUCE_COMPILER_SUPPORTS_NOEXCEPT
141 #define noexcept throw()
142 #if defined (_MSC_VER) && _MSC_VER > 1600
143 #define _ALLOW_KEYWORD_MACROS 1 // (to stop VC2012 complaining)
147 #if ! JUCE_COMPILER_SUPPORTS_NULLPTR
154 #if ! JUCE_COMPILER_SUPPORTS_OVERRIDE_AND_FINAL
160 #endif // JUCE_COMPILERSUPPORT_H_INCLUDED