
30 Nov
2013
30 Nov
'13
9:32 a.m.
Now is perhaps not a very appropriate time to ask, but why don't we seem to have a macro for the <atomic> C++11 header?
in my experience compilers may provide the <atomic> header without fully implementing its content: * some gcc versions only implement atomic<> for integral types, but not for structs * libc++'s atomic<> for structs is broken if the struct has a constructor (showstopper for boost.lockfree) if the macro whould indicate that atomic<> is somehow supported, it may be unreliable. otoh, if it is only set on a complete implementation of atomic<>, it may be too strict for many use cases, with may only require integral atomic types. so i'm not sure if such a macro would do more good than harm ... unfortunately :( cheers, tim