[NFC][libc++][test] Enables variant test.
authorMark de Wever <koraq@xs4all.nl>
Wed, 28 Sep 2022 17:58:05 +0000 (19:58 +0200)
committerMark de Wever <koraq@xs4all.nl>
Thu, 29 Sep 2022 15:28:19 +0000 (17:28 +0200)
Noticed this while working on D133326. Let's see whehter all compilers
now support this feature.

Reviewed By: #libc, philnik, ldionne

Differential Revision: https://reviews.llvm.org/D134818

libcxx/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp

index f0d539c..39a7b9b 100644 (file)
@@ -253,15 +253,11 @@ int main(int, char**) {
   test_copy_ctor_valueless_by_exception();
   test_copy_ctor_sfinae();
   test_constexpr_copy_ctor();
-#if 0
-// disable this for the moment; it fails on older compilers.
-//  Need to figure out which compilers will support it.
-{ // This is the motivating example from P0739R0
-  std::variant<int, double> v1(3);
-  std::variant v2 = v1;
-  (void) v2;
-}
-#endif
+  { // This is the motivating example from P0739R0
+    std::variant<int, double> v1(3);
+    std::variant v2 = v1;
+    (void)v2;
+  }
 
   return 0;
 }