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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user