3 #ifndef CDSLIB_COMPILER_CLANG_DEFS_H
4 #define CDSLIB_COMPILER_CLANG_DEFS_H
8 Error compiling 64bit boost.atomic on clang 3.4 - 3.5, see https://svn.boost.org/trac/boost/ticket/9610
9 Solution: use boost 1.56 +
13 #define CDS_COMPILER_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
16 #define CDS_COMPILER__NAME ("clang " __clang_version__)
17 #define CDS_COMPILER__NICK "clang"
19 #if CDS_COMPILER_VERSION < 30300
20 # error "Compiler version error. Clang version 3.3.0 and above is supported"
23 #if defined(_LIBCPP_VERSION) && !defined(CDS_USE_BOOST_ATOMIC)
24 // Note: Clang libc++ atomic leads to program crash.
25 // So, we use libcds atomic implementation
26 # define CDS_USE_LIBCDS_ATOMIC
29 #include <cds/compiler/gcc/compiler_macro.h>
31 #define alignof __alignof__
33 // C++11 inline namespace
34 #define CDS_CXX11_INLINE_NAMESPACE_SUPPORT
36 #define CDS_CONSTEXPR constexpr
38 #define CDS_NOEXCEPT_SUPPORT noexcept
39 #define CDS_NOEXCEPT_SUPPORT_(expr) noexcept(expr)
41 // C++11 thread_local keyword
42 #define CDS_CXX11_THREAD_LOCAL_SUPPORT
44 // Full SFINAE support
45 #define CDS_CXX11_SFINAE
47 // Inheriting constructors
48 #define CDS_CXX11_INHERITING_CTOR
50 // *************************************************
53 #define CDS_TYPE_ALIGNMENT(n) __attribute__ ((aligned (n)))
54 #define CDS_CLASS_ALIGNMENT(n) __attribute__ ((aligned (n)))
55 #define CDS_DATA_ALIGNMENT(n) __attribute__ ((aligned (n)))
58 #include <cds/compiler/gcc/compiler_barriers.h>
60 #endif // #ifndef CDSLIB_COMPILER_GCC_DEFS_H