[PATCH] [libcxx] Allow <atomic> to be used in c++03.

Chandler Carruth chandlerc at google.com
Wed Feb 11 19:30:36 PST 2015


On Fri, Nov 14, 2014 at 11:02 PM, Eric Fiselier <eric at efcs.ca> wrote:

> > I also don't like that we're not implementing a complete `<atomic>` in
> C++03 mode. Sounds like another good reason to not support it to me.
>
> Fair point. The only lost functionality is initialization with an `=` sign
> in it. This is more a loss of syntax than it is functionality.


This is more significant than you're making it out to be, especially in
C++03.

There is no unambiguous initialization *other* than '=' available in C++03.
=/ This makes defining correct statically initialized atomic globals very
hard, and that is a pretty fundamental use case.

I think that if we're going to make <atomic> work as an extension in C++03,
we should make this work. If we can't, we should tell users to use
stdatomic.h and C11 atomics. =/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150211/7c963b35/attachment.html>


More information about the cfe-commits mailing list