use typeof instead type (#16962)
This commit is contained in:
parent
4fac8af0c9
commit
d447c0fe3f
31 changed files with 253 additions and 253 deletions
|
|
@ -338,7 +338,7 @@ else:
|
|||
{.pop.}
|
||||
|
||||
proc load*[T: Trivial](location: var Atomic[T]; order: MemoryOrder = moSequentiallyConsistent): T {.inline.} =
|
||||
cast[T](atomic_load_explicit[nonAtomicType(T), type(location.value)](addr(location.value), order))
|
||||
cast[T](atomic_load_explicit[nonAtomicType(T), typeof(location.value)](addr(location.value), order))
|
||||
proc store*[T: Trivial](location: var Atomic[T]; desired: T; order: MemoryOrder = moSequentiallyConsistent) {.inline.} =
|
||||
atomic_store_explicit(addr(location.value), cast[nonAtomicType(T)](desired), order)
|
||||
proc exchange*[T: Trivial](location: var Atomic[T]; desired: T; order: MemoryOrder = moSequentiallyConsistent): T {.inline.} =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue