1 // (C) Copyright Douglas Gregor 2010
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)
7 // See http://www.boost.org for most recent version.
9 // Clang compiler setup.
11 #if __has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS)
13 # define BOOST_NO_EXCEPTIONS
16 #if !__has_feature(cxx_rtti)
17 # define BOOST_NO_RTTI
21 # define BOOST_HAS_MS_INT64
24 #define BOOST_HAS_NRVO
26 // Clang supports "long long" in all compilation modes.
28 #if !__has_feature(cxx_auto_type)
29 # define BOOST_NO_AUTO_DECLARATIONS
30 # define BOOST_NO_AUTO_MULTIDECLARATIONS
33 #if !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L)
34 # define BOOST_NO_CHAR16_T
35 # define BOOST_NO_CHAR32_T
38 #if !__has_feature(cxx_constexpr)
39 # define BOOST_NO_CONSTEXPR
42 #if !__has_feature(cxx_decltype)
43 # define BOOST_NO_DECLTYPE
46 #define BOOST_NO_DECLTYPE_N3276
48 #if !__has_feature(cxx_defaulted_functions)
49 # define BOOST_NO_DEFAULTED_FUNCTIONS
52 #if !__has_feature(cxx_deleted_functions)
53 # define BOOST_NO_DELETED_FUNCTIONS
56 #if !__has_feature(cxx_explicit_conversions)
57 # define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
60 #if !__has_feature(cxx_default_function_template_args)
61 # define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
64 #if !__has_feature(cxx_generalized_initializers)
65 # define BOOST_NO_INITIALIZER_LISTS
68 #if !__has_feature(cxx_lambdas)
69 # define BOOST_NO_LAMBDAS
72 #if !__has_feature(cxx_noexcept)
73 # define BOOST_NO_NOEXCEPT
76 #if !__has_feature(cxx_nullptr)
77 # define BOOST_NO_NULLPTR
80 #if !__has_feature(cxx_raw_string_literals)
81 # define BOOST_NO_RAW_LITERALS
84 #if !__has_feature(cxx_generalized_initializers)
85 # define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
88 #if !__has_feature(cxx_rvalue_references)
89 # define BOOST_NO_RVALUE_REFERENCES
92 #if !__has_feature(cxx_strong_enums)
93 # define BOOST_NO_SCOPED_ENUMS
96 #if !__has_feature(cxx_static_assert)
97 # define BOOST_NO_STATIC_ASSERT
100 #if !__has_feature(cxx_alias_templates)
101 # define BOOST_NO_TEMPLATE_ALIASES
104 #if !__has_feature(cxx_unicode_literals)
105 # define BOOST_NO_UNICODE_LITERALS
108 #if !__has_feature(cxx_variadic_templates)
109 # define BOOST_NO_VARIADIC_TEMPLATES
112 // Clang always supports variadic macros
113 // Clang always supports extern templates
115 #ifndef BOOST_COMPILER
116 # define BOOST_COMPILER "Clang version " __clang_version__
119 // Macro used to identify the Clang compiler.
120 #define BOOST_CLANG 1