Boost logo

Boost :

Subject: Re: [boost] BOOST_NO_CXX11_ATOMIC?
From: tim (tim_at_[hidden])
Date: 2013-11-30 04:32:50


> 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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk