[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 Jan 3 00:18:41 PST 2024


================
@@ -1187,12 +1187,15 @@ class expected<_Tp, _Err> {
   }
 
   _LIBCPP_HIDE_FROM_ABI constexpr void value() const& {
+    static_assert(is_copy_constructible_v<_Err>, "error_type has to be copy constructible");
----------------
PragmaTwice wrote:

Done.

https://github.com/llvm/llvm-project/pull/71819


More information about the libcxx-commits mailing list