Title: [155148] trunk/Source/WTF
Revision
155148
Author
[email protected]
Date
2013-09-05 14:17:35 -0700 (Thu, 05 Sep 2013)

Log Message

Add COMPILER_SUPPORTS(CXX_AUTO_TYPE) and #error if it's 0
https://bugs.webkit.org/show_bug.cgi?id=120794

Reviewed by Andreas Kling.

People have already begun using C++11 auto in WebCore, so let's make it a prerequisite.

* wtf/Compiler.h:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (155147 => 155148)


--- trunk/Source/WTF/ChangeLog	2013-09-05 21:07:41 UTC (rev 155147)
+++ trunk/Source/WTF/ChangeLog	2013-09-05 21:17:35 UTC (rev 155148)
@@ -1,5 +1,16 @@
 2013-09-05  Anders Carlsson  <[email protected]>
 
+        Add COMPILER_SUPPORTS(CXX_AUTO_TYPE) and #error if it's 0
+        https://bugs.webkit.org/show_bug.cgi?id=120794
+
+        Reviewed by Andreas Kling.
+
+        People have already begun using C++11 auto in WebCore, so let's make it a prerequisite.
+
+        * wtf/Compiler.h:
+
+2013-09-05  Anders Carlsson  <[email protected]>
+
         Clean up wtf/Compiler.h
         https://bugs.webkit.org/show_bug.cgi?id=120790
 

Modified: trunk/Source/WTF/wtf/Compiler.h (155147 => 155148)


--- trunk/Source/WTF/wtf/Compiler.h	2013-09-05 21:07:41 UTC (rev 155147)
+++ trunk/Source/WTF/wtf/Compiler.h	2013-09-05 21:17:35 UTC (rev 155148)
@@ -53,6 +53,7 @@
 #define WTF_COMPILER_SUPPORTS_CXX_OVERRIDE_CONTROL __has_feature(cxx_override_control)
 #define WTF_COMPILER_SUPPORTS_CXX_STRONG_ENUMS __has_feature(cxx_strong_enums)
 #define WTF_COMPILER_SUPPORTS_CXX_REFERENCE_QUALIFIED_FUNCTIONS __has_feature(cxx_reference_qualified_functions)
+#define WTF_COMPILER_SUPPORTS_CXX_AUTO_TYPE __has_feature(cxx_auto_type)
 
 /* Disable final on versions of Apple clang earlier than 4.2 to avoid bugs like http://webkit.org/b/119165 */
 #if defined(__APPLE__) && (__clang_major__ < 4 || (__clang_major__ == 4 && __clang_minor__ < 2))
@@ -83,6 +84,7 @@
 #if _MSC_VER >= 1600
 #define WTF_COMPILER_SUPPORTS_CXX_RVALUE_REFERENCES 1
 #define WTF_COMPILER_SUPPORTS_CXX_STATIC_ASSERT 1
+#define WTF_COMPILER_SUPPORTS_CXX_AUTO_TYPE 1
 #endif
 
 #endif /* defined(_MSC_VER) */
@@ -130,6 +132,7 @@
 #define WTF_COMPILER_SUPPORTS_CXX_RVALUE_REFERENCES 1
 #define WTF_COMPILER_SUPPORTS_CXX_STATIC_ASSERT 1
 #define WTF_COMPILER_SUPPORTS_CXX_VARIADIC_TEMPLATES 1
+#define WTF_COMPILER_SUPPORTS_CXX_AUTO_TYPE 1
 #endif
 #if GCC_VERSION_AT_LEAST(4, 4, 0)
 #define WTF_COMPILER_SUPPORTS_CXX_DELETED_FUNCTIONS 1
@@ -184,7 +187,10 @@
 #if !COMPILER_SUPPORTS(CXX_STATIC_ASSERT)
 #error "Please use a compiler that supports C++11 static_assert."
 #endif
+#if !COMPILER_SUPPORTS(CXX_AUTO_TYPE)
+#error "Please use a compiler that supports C++11 auto."
 #endif
+#endif
 
 /* ALWAYS_INLINE */
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to