summaryrefslogtreecommitdiff
path: root/src/mongo/db/update
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2021-08-04 14:50:02 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-08-15 17:41:42 +0000
commitbf1abfe3e0d0eada19512d69dfe8e9e9183b946c (patch)
treec1db45bd4e1c099192281c50a4fbb512b25ee41c /src/mongo/db/update
parente07b3a958f7f46b7e5fc678c86c968d1f54da1d9 (diff)
downloadmongo-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.cpp2
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));