From 5c61b9d0cffc130dcb3949e9781823f2e8b5022d Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Mon, 15 Oct 2018 19:46:03 +0000 Subject: [PATCH] Mark a couple of test cases as 'C++17-only' pending the resolution of PR#39232 llvm-svn: 344546 --- .../utilities/variant/variant.variant/variant.status/index.pass.cpp | 4 +++- .../variant.variant/variant.status/valueless_by_exception.pass.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp index 8025b9e..7ab828e 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp @@ -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; constexpr V v; static_assert(v.index() == 0, ""); } +#endif { using V = std::variant; constexpr V v(std::in_place_index<1>); diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp index 660a21c..be02191 100644 --- a/libcxx/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp +++ b/libcxx/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp @@ -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; constexpr V v; static_assert(!v.valueless_by_exception(), ""); } +#endif { using V = std::variant; const V v("abc"); -- 2.7.4