[libcxx] r344582 - Re-apply r344546 "Mark a couple of test cases as 'C++17-only'..."
Artem Dergachev
artem.dergachev at gmail.com
Mon Oct 15 20:36:55 PDT 2018
Author: dergachev
Date: Mon Oct 15 20:36:55 2018
New Revision: 344582
URL: http://llvm.org/viewvc/llvm-project?rev=344582&view=rev
Log:
Re-apply r344546 "Mark a couple of test cases as 'C++17-only'..."
Reverted too much in r344580.
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=344582&r1=344581&r2=344582&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 20:36:55 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=344582&r1=344581&r2=344582&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 20:36:55 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