================
@@ -1150,12 +1150,15 @@ class expected<_Tp, _Err> {
   }
 
   _LIBCPP_HIDE_FROM_ABI constexpr void value() const& {
+    static_assert(is_copy_constructible_v<_Err>);
     if (!__has_val_) {
       std::__throw_bad_expected_access<_Err>(__union_.__unex_);
     }
   }
 
   _LIBCPP_HIDE_FROM_ABI constexpr void value() && {
+    static_assert(is_copy_constructible_v<_Err> && 
is_move_constructible_v<_Err>,
+                  "error_type has to be both copy constructible and move 
constructible");
----------------
mordante wrote:

Since we don't require a message in `static_assert` anymore and this message 
adds no extra information, let's remove it.

https://github.com/llvm/llvm-project/pull/71819
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to