[libcxx-commits] [libcxx] [libcxx] applies #134819 to `insert_or_assign` with `const key_type&` (PR #140124)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu May 15 12:21:00 PDT 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 HEAD~1 HEAD --extensions ,cpp -- libcxx/include/map libcxx/test/std/containers/associative/map/map.modifiers/insert_or_assign.pass.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/insert_or_assign.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/insert_or_assign.pass.cpp
index 0697541b8..22d4a19a0 100644
--- a/libcxx/test/std/containers/associative/map/map.modifiers/insert_or_assign.pass.cpp
+++ b/libcxx/test/std/containers/associative/map/map.modifiers/insert_or_assign.pass.cpp
@@ -141,7 +141,7 @@ int main(int, char**) {
Moveable mv1(3, 3.0);
const int key1 = 2;
- r = m.insert_or_assign(it, key1, std::move(mv1));
+ r = m.insert_or_assign(it, key1, std::move(mv1));
assert(m.size() == 10);
assert(mv1.moved()); // was moved from
assert(r->first == 2); // key
@@ -149,7 +149,7 @@ int main(int, char**) {
Moveable mv2(5, 5.0);
const int key2 = 3;
- r = m.insert_or_assign(it, key2, std::move(mv2));
+ r = m.insert_or_assign(it, key2, std::move(mv2));
assert(m.size() == 11);
assert(mv2.moved()); // was moved from
assert(r->first == 3); // key
@@ -158,7 +158,7 @@ int main(int, char**) {
// wrong hint: begin()
Moveable mv3(7, 7.0);
const int key3 = 4;
- r = m.insert_or_assign(m.begin(), key3, std::move(mv3));
+ r = m.insert_or_assign(m.begin(), key3, std::move(mv3));
assert(m.size() == 11);
assert(mv3.moved()); // was moved from
assert(r->first == 4); // key
@@ -166,7 +166,7 @@ int main(int, char**) {
Moveable mv4(9, 9.0);
const int key4 = 5;
- r = m.insert_or_assign(m.begin(), key4, std::move(mv4));
+ r = m.insert_or_assign(m.begin(), key4, std::move(mv4));
assert(m.size() == 12);
assert(mv4.moved()); // was moved from
assert(r->first == 5); // key
@@ -175,7 +175,7 @@ int main(int, char**) {
// wrong hint: end()
Moveable mv5(11, 11.0);
const int key5 = 6;
- r = m.insert_or_assign(m.end(), key5, std::move(mv5));
+ r = m.insert_or_assign(m.end(), key5, std::move(mv5));
assert(m.size() == 12);
assert(mv5.moved()); // was moved from
assert(r->first == 6); // key
@@ -183,7 +183,7 @@ int main(int, char**) {
Moveable mv6(13, 13.0);
const int key6 = 7;
- r = m.insert_or_assign(m.end(), key6, std::move(mv6));
+ r = m.insert_or_assign(m.end(), key6, std::move(mv6));
assert(m.size() == 13);
assert(mv6.moved()); // was moved from
assert(r->first == 7); // key
@@ -192,7 +192,7 @@ int main(int, char**) {
// wrong hint: third element
Moveable mv7(15, 15.0);
const int key7 = 8;
- r = m.insert_or_assign(std::next(m.begin(), 2), key7, std::move(mv7));
+ r = m.insert_or_assign(std::next(m.begin(), 2), key7, std::move(mv7));
assert(m.size() == 13);
assert(mv7.moved()); // was moved from
assert(r->first == 8); // key
@@ -200,7 +200,7 @@ int main(int, char**) {
Moveable mv8(17, 17.0);
const int key8 = 9;
- r = m.insert_or_assign(std::next(m.begin(), 2), key8, std::move(mv8));
+ r = m.insert_or_assign(std::next(m.begin(), 2), key8, std::move(mv8));
assert(m.size() == 14);
assert(mv8.moved()); // was moved from
assert(r->first == 9); // key
``````````
</details>
https://github.com/llvm/llvm-project/pull/140124
More information about the libcxx-commits
mailing list