
8 Nov
2011
8 Nov
'11
5:25 p.m.
Tim Blechmann wrote:
isn't atomic_is_lock_free only defined for integral types?
I'm not aware of any such requirement.
and why isn't atomic::is_lock_free a static member function?
I don't know.
dispatching per-object would actually make sense, because there may be platforms which require objects to be aligned to certain memory boundaries for double-width CAS.
It can be read that way, but it doesn't make much sense from the user's perspective for objects to randomly be lock-free or non-lock-free. std::atomic<> should ensure the necessary alignment.