mirror of
https://github.com/google/benchmark.git
synced 2025-04-29 06:20:32 +08:00
fix const correctness issue on gcc
This commit is contained in:
parent
6bc1d1c19e
commit
8de8bd7545
@ -185,7 +185,7 @@ void UseCharPointer(char const volatile*);
|
||||
#if defined(__GNUC__)
|
||||
template <class Tp>
|
||||
inline BENCHMARK_ALWAYS_INLINE void DoNotOptimize(Tp const& value) {
|
||||
asm volatile("" : "+r" (value));
|
||||
asm volatile("" : "+r" (const_cast<Tp&>(value)));
|
||||
}
|
||||
#else
|
||||
template <class Tp>
|
||||
|
Loading…
Reference in New Issue
Block a user