2
0
mirror of https://github.com/boostorg/atomic.git synced 2026-02-17 12:52:07 +00:00

atomic: fix const-correctnes of double-width load

[SVN r80454]
This commit is contained in:
Tim Blechmann
2012-09-08 16:36:11 +00:00
parent 00a7156487
commit 94f7a5bd30

View File

@@ -1556,11 +1556,11 @@ platform_store64(T value, volatile T * ptr)
template<typename T>
T
platform_load64(volatile T * ptr)
platform_load64(const volatile T * ptr)
{
T expected = *ptr;
do {
} while (!platform_cmpxchg64_strong(expected, expected, ptr));
} while (!platform_cmpxchg64_strong(expected, expected, const_cast<volatile T*>(ptr)));
return expected;
}