Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc++] LWG4025: Move assignment operator of std::expected<cv void, E> should not be conditionally deleted #109363

Merged
merged 3 commits into from
Sep 27, 2024

Conversation

xiaoyang-sde
Copy link
Member

Introduction

This patch implements LWG4025: Move assignment operator of std::expected<cv void, E> should not be conditionally deleted.

Reference

Closes #105324

@xiaoyang-sde xiaoyang-sde requested a review from a team as a code owner September 20, 2024 02:21
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Sep 20, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Sep 20, 2024

@llvm/pr-subscribers-libcxx

Author: Xiaoyang Liu (xiaoyang-sde)

Changes

Introduction

This patch implements LWG4025: Move assignment operator of std::expected&lt;cv void, E&gt; should not be conditionally deleted.

Reference

Closes #105324


Full diff: https://github.com/llvm/llvm-project/pull/109363.diff

1 Files Affected:

  • (modified) libcxx/include/__expected/expected.h (-2)
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>)

@ldionne
Copy link
Member

ldionne commented Sep 25, 2024

Please rebase onto main to re-trigger CI. The CI instability should be resolved now.

@ldionne ldionne merged commit 51259de into llvm:main Sep 27, 2024
62 checks passed
@xiaoyang-sde xiaoyang-sde deleted the lwg4025 branch September 27, 2024 19:10
Sterling-Augustine pushed a commit to Sterling-Augustine/llvm-project that referenced this pull request Sep 27, 2024
… E>` should not be conditionally deleted (llvm#109363)

This patch implements LWG4025: Move assignment operator of
`std::expected<cv void, E>` should not be conditionally deleted.

Closes llvm#105324
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LWG4025: Move assignment operator of std::expected<cv void, E> should not be conditionally deleted
3 participants