Skip to content

Commit

Permalink
Support for building with LLVM clang-10/clang-11 on Windows. (google#…
Browse files Browse the repository at this point in the history
…1227)

* Fix enum underlying type specification

* Fix C++0x-only solution
  • Loading branch information
alisenai authored and sergiud committed Jan 13, 2022
1 parent b0a9a1e commit 646ae57
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions include/benchmark/benchmark.h
Original file line number Diff line number Diff line change
Expand Up @@ -453,27 +453,27 @@ class Counter {
kDefaults = 0,
// Mark the counter as a rate. It will be presented divided
// by the duration of the benchmark.
kIsRate = 1U << 0U,
kIsRate = 1 << 0,
// Mark the counter as a thread-average quantity. It will be
// presented divided by the number of threads.
kAvgThreads = 1U << 1U,
kAvgThreads = 1 << 1,
// Mark the counter as a thread-average rate. See above.
kAvgThreadsRate = kIsRate | kAvgThreads,
// Mark the counter as a constant value, valid/same for *every* iteration.
// When reporting, it will be *multiplied* by the iteration count.
kIsIterationInvariant = 1U << 2U,
kIsIterationInvariant = 1 << 2,
// Mark the counter as a constant rate.
// When reporting, it will be *multiplied* by the iteration count
// and then divided by the duration of the benchmark.
kIsIterationInvariantRate = kIsRate | kIsIterationInvariant,
// Mark the counter as a iteration-average quantity.
// It will be presented divided by the number of iterations.
kAvgIterations = 1U << 3U,
kAvgIterations = 1 << 3,
// Mark the counter as a iteration-average rate. See above.
kAvgIterationsRate = kIsRate | kAvgIterations,

// In the end, invert the result. This is always done last!
kInvert = 1U << 31U
kInvert = 1 << 31
};

enum OneK {
Expand Down

0 comments on commit 646ae57

Please sign in to comment.