projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Change the enumerate() example to bind the proxy by reference
[folly.git]
/
folly
/
container
/
test
/
ForeachBenchmark.cpp
diff --git
a/folly/container/test/ForeachBenchmark.cpp
b/folly/container/test/ForeachBenchmark.cpp
index a3e810eb5c905135ef173c5263e27e67deb98434..083cba5fc864494b67070e7316ee28e0dff64c38 100644
(file)
--- a/
folly/container/test/ForeachBenchmark.cpp
+++ b/
folly/container/test/ForeachBenchmark.cpp
@@
-389,7
+389,7
@@
BENCHMARK(CharVecForRangeEnumerate, iters) {
setupCharVecBenchmark(iters);
}
size_t sum = 0;
- for (auto it : enumerate(vec_char)) {
+ for (auto
&&
it : enumerate(vec_char)) {
sum += *it * it.index;
}
doNotOptimizeAway(sum);