Remove CDS_CXX11_EXPLICIT_CONVERSION_OPERATOR_SUPPORT macro and emulating code
[libcds.git] / cds / compiler / gcc / defs.h
1 //$$CDS-header$$
2
3 #ifndef __CDS_COMPILER_GCC_DEFS_H
4 #define __CDS_COMPILER_GCC_DEFS_H
5
6 // Compiler version
7 #define CDS_COMPILER_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
8
9 #if CDS_COMPILER_VERSION < 40800
10 #   error "Compiler version error. GCC version 4.8.0 and above is supported"
11 #endif
12
13 // Compiler name
14 #ifdef __VERSION__
15 #   define  CDS_COMPILER__NAME    ("GNU C++ " __VERSION__)
16 #else
17 #   define  CDS_COMPILER__NAME    "GNU C++"
18 #endif
19 #define  CDS_COMPILER__NICK        "gcc"
20
21 #include <cds/compiler/gcc/compiler_macro.h>
22
23
24 #define alignof __alignof__
25
26 // ***************************************
27 // C++11 features
28
29 #define CDS_CXX11_VARIADIC_TEMPLATE_SUPPORT
30
31 // RValue
32 #define CDS_RVALUE_SUPPORT
33 #define CDS_MOVE_SEMANTICS_SUPPORT
34
35 #define CDS_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS_SUPPORT
36
37 // C++11 inline namespace
38 #define CDS_CXX11_INLINE_NAMESPACE_SUPPORT
39
40 // C++11 delete definition ( function declaration = delete)
41 #define CDS_CXX11_DELETE_DEFINITION_SUPPORT
42
43 // C++11 explicitly-defaulted function (= default) [std 8.4.2 [dcl.fct.def.default]]
44 #define CDS_CXX11_EXPLICITLY_DEFAULTED_FUNCTION_SUPPORT
45
46 // Lambda
47 #define CDS_CXX11_LAMBDA_SUPPORT
48
49 // constexpr
50 #define CDS_CONSTEXPR    constexpr
51
52 // noexcept
53 #define CDS_NOEXCEPT_SUPPORT        noexcept
54 #define CDS_NOEXCEPT_SUPPORT_(expr) noexcept(expr)
55 #define CDS_CONSTEXPR_CONST constexpr const
56
57 // C++11 thread_local keyword
58 #define CDS_CXX11_THREAD_LOCAL_SUPPORT
59
60 // Full SFINAE support
61 #define CDS_CXX11_SFINAE
62
63 // *************************************************
64 // Alignment macro
65
66 #define CDS_TYPE_ALIGNMENT(n)   __attribute__ ((aligned (n)))
67 #define CDS_CLASS_ALIGNMENT(n)  __attribute__ ((aligned (n)))
68 #define CDS_DATA_ALIGNMENT(n)   __attribute__ ((aligned (n)))
69
70
71 #include <cds/compiler/gcc/compiler_barriers.h>
72
73 #endif // #ifndef __CDS_COMPILER_GCC_DEFS_H