[libcxx-commits] [libcxx] [libc++] Implement LWG3940: std::expected<void, E>::value() also needs E to be copy constructible (PR #71819)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Dec 13 03:19:19 PST 2023
================
@@ -0,0 +1,24 @@
+//===----------------------------------------------------------------------===//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
+
+// constexpr void value() &&;
+// Mandates: is_copy_constructible_v<E> is true and is_move_constructible_v<E> is true.
+
+#include <expected>
+
+#include "MoveOnly.h"
+
+void test() {
----------------
huixie90 wrote:
Could you add a test for none `void` case too?
https://github.com/llvm/llvm-project/pull/71819
More information about the libcxx-commits
mailing list