Commit 1e9db9f5 authored by Thiago Macieira's avatar Thiago Macieira
Browse files

Enable C++11 atomics with Clang


I don't know why it was an #if 0. The __has_feature has been there for a
while. But, just to be sure, we check the presence of the header too.

Change-Id: I36e34c9e8fd4ce55c98966d2fad246b77eb16597
Reviewed-by: default avatarOlivier Goffart <ogoffart@woboq.com>
Showing with 3 additions and 1 deletion
......@@ -581,7 +581,7 @@
# define Q_COMPILER_ALIGNAS
# define Q_COMPILER_ALIGNOF
# endif
# if 0 /* not implemented in clang yet */
# if __has_feature(cxx_atomic) && __has_include(<atomic>)
# define Q_COMPILER_ATOMICS
# endif
# if __has_feature(cxx_attributes)
......@@ -880,6 +880,8 @@
# undef Q_COMPILER_INITIALIZER_LISTS
# undef Q_COMPILER_RVALUE_REFS
# undef Q_COMPILER_REF_QUALIFIERS
// Also disable <atomic>, since it's clearly not there
# undef Q_COMPILER_ATOMICS
# endif
# if defined(_LIBCPP_VERSION)
// libc++ uses __has_feature(cxx_atomic), so disable the feature if the compiler
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment