mbed_atomic.h: Improve template type deduction
Avoid template ambiguities using type_identity_t. Previously the compiler would be unable to figure out whether uint8_t x; core_util_atomic_store(&x, 0); should invoke core_util_atomic_store<uint8_t>, matching the pointer type, or core_util_atomic_store<int>, matching the value, leading to an ambiguity error. Templates now select only on the type of the atomic pointer parameter. |
---|
|
platform/mbed_atomic.h |
---|