[libcxx-commits] [libcxx] Fixed Reference copy and move assignment operators (PR #125723)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Feb 4 09:25:17 PST 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 906eeeda833b30fb7fdc3b7586de34b65d575b45 fb9032fa397b399affb27757e67f85d30b2ace65 --extensions cpp -- libcxx/test/std/algorithms/robust_against_proxy_iterators_lifetime_bugs.pass.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/std/algorithms/robust_against_proxy_iterators_lifetime_bugs.pass.cpp b/libcxx/test/std/algorithms/robust_against_proxy_iterators_lifetime_bugs.pass.cpp
index e39881a5e5..4b5b7d31b7 100644
--- a/libcxx/test/std/algorithms/robust_against_proxy_iterators_lifetime_bugs.pass.cpp
+++ b/libcxx/test/std/algorithms/robust_against_proxy_iterators_lifetime_bugs.pass.cpp
@@ -159,7 +159,7 @@ class LifetimeIterator {
assert(!rhs.moved_from_);
rhs.moved_from_ = true;
- *v_ = std::move(*rhs.v_);
+ *v_ = std::move(*rhs.v_);
moved_from_ = false;
return *this;
@@ -368,7 +368,7 @@ class ConstexprIterator {
constexpr Reference(const Reference& rhs) = default;
constexpr Reference& operator=(const Reference& rhs) {
assert(!rhs.moved_from_);
- *v_ = *rhs.v_;
+ *v_ = *rhs.v_;
moved_from_ = false;
return *this;
``````````
</details>
https://github.com/llvm/llvm-project/pull/125723
More information about the libcxx-commits
mailing list