Always use atomic in C++

This commit is contained in:
Patrick Pelissier committed 2020-06-27 00:31:58 +02:00
1 parent aee02d86ab
commit f742707699
1 file changed
+2 -2
+2 -2
View File
@@ -29,11 +29,11 @@
it is hard to use this header directly with a C++ compiler like
g++ or MSVC.
(See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60932 ).
clang++ has no issue with this header (except on MAC)
clang++ has no issue with this header but if someone includes
atomic from C++, there is incompatibility between atomic & stdatomic
GCC 4.9 doesn't have a working implementation of 'atomic'
*/
#if defined(__cplusplus) && __cplusplus >= 201103L \
&& !(defined(__clang__) && !(defined(__APPLE__) && defined(__MACH__)) ) \
&& !(defined(__GNUC__) && __GNUC__ < 5)
/* NOTE: This is what the stdatomic.h header shall do in C++ mode. */