[libcxx] r344546 - Mark a couple of test cases as 'C++17-only' pending the resolution of PR#39232

Marshall Clow mclow.lists at gmail.com
Mon Oct 15 12:46:03 PDT 2018


Author: marshall
Date: Mon Oct 15 12:46:03 2018
New Revision: 344546

URL: http://llvm.org/viewvc/llvm-project?rev=344546&view=rev
Log:
Mark a couple of test cases as 'C++17-only' pending the resolution of PR#39232

Modified:
    libcxx/trunk/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp
    libcxx/trunk/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp

Modified: libcxx/trunk/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp?rev=344546&r1=344545&r2=344546&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp Mon Oct 15 12:46:03 2018
@@ -34,11 +34,13 @@
 #include "variant_test_helpers.hpp"
 
 int main() {
-  {
+#if TEST_STD_VER == 17
+  { // This test does not pass on C++20 or later; see https://bugs.llvm.org/show_bug.cgi?id=39232
     using V = std::variant<int, ConstexprTestTypes::NoCtors>;
     constexpr V v;
     static_assert(v.index() == 0, "");
   }
+#endif
   {
     using V = std::variant<int, long>;
     constexpr V v(std::in_place_index<1>);

Modified: libcxx/trunk/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp?rev=344546&r1=344545&r2=344546&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp Mon Oct 15 12:46:03 2018
@@ -34,11 +34,13 @@
 #include "variant_test_helpers.hpp"
 
 int main() {
-  {
+#if TEST_STD_VER == 17
+  { // This test does not pass on C++20 or later; see https://bugs.llvm.org/show_bug.cgi?id=39232
     using V = std::variant<int, ConstexprTestTypes::NoCtors>;
     constexpr V v;
     static_assert(!v.valueless_by_exception(), "");
   }
+#endif
   {
     using V = std::variant<int, long, std::string>;
     const V v("abc");




More information about the libcxx-commits mailing list