[libcxx-commits] [libcxx] [libc++] Make benchmarks forward-compatible with the test suite (PR #114502)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Nov 1 05:43:40 PDT 2024
================
@@ -181,7 +184,7 @@ struct IterateRangeFor : Base {
while (State.KeepRunningBatch(TableSize * NumTables)) {
for (auto& Set : Data.Sets) {
for (auto& V : Set) {
- benchmark::DoNotOptimize(V);
+ benchmark::DoNotOptimize(const_cast<std::set<uint64_t>::reference>(V));
----------------
ldionne wrote:
Same here as above: `error: 'DoNotOptimize<unsigned long long>' is deprecated: The const-ref version of this method can permit undesired compiler optimizations in benchmarks [-Werror,-Wdeprecated-declarations]`
https://github.com/llvm/llvm-project/pull/114502
More information about the libcxx-commits
mailing list