[PATCH] D32726: [libcxx] [test] In msvc_stdlib_force_include.hpp, use _HAS_CXX17 to set TEST_STD_VER.

Stephan T. Lavavej via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 1 17:38:45 PDT 2017


STL_MSFT created this revision.

[libcxx] [test] In msvc_stdlib_force_include.hpp, use _HAS_CXX17 to set TEST_STD_VER.

_HAS_CXX17 indicates whether MSVC's STL is in C++17 mode.


https://reviews.llvm.org/D32726

Files:
  test/support/msvc_stdlib_force_include.hpp


Index: test/support/msvc_stdlib_force_include.hpp
===================================================================
--- test/support/msvc_stdlib_force_include.hpp
+++ test/support/msvc_stdlib_force_include.hpp
@@ -40,8 +40,6 @@
 
 // MSVC frontend only configurations
 #if !defined(__clang__)
-    #define TEST_STD_VER 17
-
     // Simulate feature-test macros.
     #define __has_feature(X) _MSVC_HAS_FEATURE_ ## X
     #define _MSVC_HAS_FEATURE_cxx_exceptions    1
@@ -75,4 +73,12 @@
 // Silence warnings about raw pointers and other unchecked iterators.
 #define _SCL_SECURE_NO_WARNINGS
 
+#include <ciso646>
+
+#if _HAS_CXX17
+    #define TEST_STD_VER 17
+#else // _HAS_CXX17
+    #define TEST_STD_VER 14
+#endif // _HAS_CXX17
+
 #endif // SUPPORT_MSVC_STDLIB_FORCE_INCLUDE_HPP


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32726.97372.patch
Type: text/x-patch
Size: 784 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170502/e374780b/attachment.bin>


More information about the cfe-commits mailing list