diff options
author | Andrew Morrow <acm@mongodb.com> | 2021-08-04 14:50:02 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-08-15 17:41:42 +0000 |
commit | bf1abfe3e0d0eada19512d69dfe8e9e9183b946c (patch) | |
tree | c1db45bd4e1c099192281c50a4fbb512b25ee41c /src/mongo/db/update | |
parent | e07b3a958f7f46b7e5fc678c86c968d1f54da1d9 (diff) | |
download | mongo-bf1abfe3e0d0eada19512d69dfe8e9e9183b946c.tar.gz |
SERVER-59230 Fix compile errors in C++20 mode with GCC 11 and clang 12
Diffstat (limited to 'src/mongo/db/update')
-rw-r--r-- | src/mongo/db/update/push_node.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/update/push_node.cpp b/src/mongo/db/update/push_node.cpp index e236f2e9124..f428269a924 100644 --- a/src/mongo/db/update/push_node.cpp +++ b/src/mongo/db/update/push_node.cpp @@ -274,7 +274,7 @@ ModifierNode::ModifyResult PushNode::insertElementsWithPosition( std::accumulate(std::next(valuesToPush.begin()), valuesToPush.end(), firstElementToInsert, - [&document](auto& insertAfter, auto& valueToInsert) { + [&document](auto&& insertAfter, auto& valueToInsert) { auto nextElementToInsert = document.makeElementWithNewFieldName(StringData(), valueToInsert); invariant(insertAfter.addSiblingRight(nextElementToInsert)); |