1 // (C) Copyright Douglas Gregor 2010 2 // 3 // Use, modification and distribution are subject to the 4 // Boost Software License, Version 1.0. (See accompanying file 5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 7 // See http://www.boost.org for most recent version. 8 9 // Clang compiler setup. 10 11 #if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS) 12 # define BOOST_NO_EXCEPTIONS 13 #endif 14 15 #if !__has_feature(cxx_rtti) && !defined(BOOST_NO_RTTI) 16 # define BOOST_NO_RTTI 17 #endif 18 19 #if !__has_feature(cxx_rtti) && !defined(BOOST_NO_TYPEID) 20 # define BOOST_NO_TYPEID 21 #endif 22 23 #if defined(__int64) 24 # define BOOST_HAS_MS_INT64 25 #endif 26 27 #define BOOST_HAS_NRVO 28 29 // Clang supports "long long" in all compilation modes. 30 #define BOOST_HAS_LONG_LONG 31 32 #if !__has_feature(cxx_auto_type) 33 # define BOOST_NO_CXX11_AUTO_DECLARATIONS 34 # define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS 35 #endif 36 37 #if !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L) 38 # define BOOST_NO_CXX11_CHAR16_T 39 # define BOOST_NO_CXX11_CHAR32_T 40 #endif 41 42 #if !__has_feature(cxx_constexpr) 43 # define BOOST_NO_CXX11_CONSTEXPR 44 #endif 45 46 #if !__has_feature(cxx_decltype) 47 # define BOOST_NO_CXX11_DECLTYPE 48 #endif 49 50 #if !__has_feature(cxx_decltype_incomplete_return_types) 51 # define BOOST_NO_CXX11_DECLTYPE_N3276 52 #endif 53 54 #if !__has_feature(cxx_defaulted_functions) 55 # define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS 56 #endif 57 58 #if !__has_feature(cxx_deleted_functions) 59 # define BOOST_NO_CXX11_DELETED_FUNCTIONS 60 #endif 61 62 #if !__has_feature(cxx_explicit_conversions) 63 # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS 64 #endif 65 66 #if !__has_feature(cxx_default_function_template_args) 67 # define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS 68 #endif 69 70 #if !__has_feature(cxx_generalized_initializers) 71 # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST 72 #endif 73 74 #if !__has_feature(cxx_lambdas) 75 # define BOOST_NO_CXX11_LAMBDAS 76 #endif 77 78 #if !__has_feature(cxx_local_type_template_args) 79 # define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS 80 #endif 81 82 #if !__has_feature(cxx_noexcept) 83 # define BOOST_NO_CXX11_NOEXCEPT 84 #endif 85 86 #if !__has_feature(cxx_nullptr) 87 # define BOOST_NO_CXX11_NULLPTR 88 #endif 89 90 #if !__has_feature(cxx_range_for) 91 # define BOOST_NO_CXX11_RANGE_BASED_FOR 92 #endif 93 94 #if !__has_feature(cxx_raw_string_literals) 95 # define BOOST_NO_CXX11_RAW_LITERALS 96 #endif 97 98 #if !__has_feature(cxx_generalized_initializers) 99 # define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX 100 #endif 101 102 #if !__has_feature(cxx_rvalue_references) 103 # define BOOST_NO_CXX11_RVALUE_REFERENCES 104 #endif 105 106 #if !__has_feature(cxx_strong_enums) 107 # define BOOST_NO_CXX11_SCOPED_ENUMS 108 #endif 109 110 #if !__has_feature(cxx_static_assert) 111 # define BOOST_NO_CXX11_STATIC_ASSERT 112 #endif 113 114 #if !__has_feature(cxx_alias_templates) 115 # define BOOST_NO_CXX11_TEMPLATE_ALIASES 116 #endif 117 118 #if !__has_feature(cxx_unicode_literals) 119 # define BOOST_NO_CXX11_UNICODE_LITERALS 120 #endif 121 122 #if !__has_feature(cxx_variadic_templates) 123 # define BOOST_NO_CXX11_VARIADIC_TEMPLATES 124 #endif 125 126 // Clang always supports variadic macros 127 // Clang always supports extern templates 128 129 #ifndef BOOST_COMPILER 130 # define BOOST_COMPILER "Clang version " __clang_version__ 131 #endif 132 133 // Macro used to identify the Clang compiler. 134 #define BOOST_CLANG 1 135 136