[libcxx-commits] [libcxx] [libc++] LWG4025: Move assignment operator of `std::expected<cv void, E>` should not be conditionally deleted (PR #109363)
Xiaoyang Liu via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Sep 19 19:21:06 PDT 2024
https://github.com/xiaoyang-sde created https://github.com/llvm/llvm-project/pull/109363
## Introduction
This patch implements LWG4025: Move assignment operator of `std::expected<cv void, E>` should not be conditionally deleted.
## Reference
- [[expected.void.assign]](https://eel.is/c++draft/expected.void.assign)
- [LWG4025](https://cplusplus.github.io/LWG/issue4025)
Closes #105324
>From e5041855af20b5475b45ee9073643b434af4d52e Mon Sep 17 00:00:00 2001
From: Xiaoyang Liu <siujoeng.lau at gmail.com>
Date: Thu, 19 Sep 2024 22:16:31 -0400
Subject: [PATCH] [libc++] LWG4025: Move assignment operator of
'std::expected<cv void, E>' should not be conditionally deleted
---
libcxx/include/__expected/expected.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/libcxx/include/__expected/expected.h b/libcxx/include/__expected/expected.h
index f4ad455a19ea5e..e04e17d1ebe698 100644
--- a/libcxx/include/__expected/expected.h
+++ b/libcxx/include/__expected/expected.h
@@ -1493,8 +1493,6 @@ class expected<_Tp, _Err> : private __expected_void_base<_Err> {
return *this;
}
- _LIBCPP_HIDE_FROM_ABI constexpr expected& operator=(expected&&) = delete;
-
_LIBCPP_HIDE_FROM_ABI constexpr expected&
operator=(expected&& __rhs) noexcept(is_nothrow_move_assignable_v<_Err> && is_nothrow_move_constructible_v<_Err>)
requires(is_move_assignable_v<_Err> && is_move_constructible_v<_Err>)
More information about the libcxx-commits
mailing list