[libcxx-commits] [libcxx] [libc++] Implement LWG3940: std::expected<void, E>::value() also needs E to be copy constructible (PR #71819)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Nov 24 11:01:20 PST 2023
================
@@ -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");
----------------
mordante wrote:
The message of `static_assert` is optional. Since the text tells the same story as the code how about removing it?
https://github.com/llvm/llvm-project/pull/71819
More information about the libcxx-commits
mailing list