blob: 18d6e5462a0619f2258893ef6c62ae2ba2ff628d [file] [log] [blame]
Jeff Thompsonf7d49942013-08-01 16:47:40 -07001// (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//
33// Dynamic shared object (DSO) and dynamic-link library (DLL) support
34//
35#if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
36# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default")))
37# define BOOST_SYMBOL_IMPORT
38# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default")))
39#endif
40
41#if !__has_feature(cxx_auto_type)
42# define BOOST_NO_CXX11_AUTO_DECLARATIONS
43# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
44#endif
45
46#if !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L)
47# define BOOST_NO_CXX11_CHAR16_T
48# define BOOST_NO_CXX11_CHAR32_T
49#endif
50
51#if !__has_feature(cxx_constexpr)
52# define BOOST_NO_CXX11_CONSTEXPR
53#endif
54
55#if !__has_feature(cxx_decltype)
56# define BOOST_NO_CXX11_DECLTYPE
57#endif
58
59#if !__has_feature(cxx_decltype_incomplete_return_types)
60# define BOOST_NO_CXX11_DECLTYPE_N3276
61#endif
62
63#if !__has_feature(cxx_defaulted_functions)
64# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
65#endif
66
67#if !__has_feature(cxx_deleted_functions)
68# define BOOST_NO_CXX11_DELETED_FUNCTIONS
69#endif
70
71#if !__has_feature(cxx_explicit_conversions)
72# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
73#endif
74
75#if !__has_feature(cxx_default_function_template_args)
76# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
77#endif
78
79#if !__has_feature(cxx_generalized_initializers)
80# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
81#endif
82
83#if !__has_feature(cxx_lambdas)
84# define BOOST_NO_CXX11_LAMBDAS
85#endif
86
87#if !__has_feature(cxx_local_type_template_args)
88# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
89#endif
90
91#if !__has_feature(cxx_noexcept)
92# define BOOST_NO_CXX11_NOEXCEPT
93#endif
94
95#if !__has_feature(cxx_nullptr)
96# define BOOST_NO_CXX11_NULLPTR
97#endif
98
99#if !__has_feature(cxx_range_for)
100# define BOOST_NO_CXX11_RANGE_BASED_FOR
101#endif
102
103#if !__has_feature(cxx_raw_string_literals)
104# define BOOST_NO_CXX11_RAW_LITERALS
105#endif
106
107#if !__has_feature(cxx_generalized_initializers)
108# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
109#endif
110
111#if !__has_feature(cxx_rvalue_references)
112# define BOOST_NO_CXX11_RVALUE_REFERENCES
113#endif
114
115#if !__has_feature(cxx_strong_enums)
116# define BOOST_NO_CXX11_SCOPED_ENUMS
117#endif
118
119#if !__has_feature(cxx_static_assert)
120# define BOOST_NO_CXX11_STATIC_ASSERT
121#endif
122
123#if !__has_feature(cxx_alias_templates)
124# define BOOST_NO_CXX11_TEMPLATE_ALIASES
125#endif
126
127#if !__has_feature(cxx_unicode_literals)
128# define BOOST_NO_CXX11_UNICODE_LITERALS
129#endif
130
131#if !__has_feature(cxx_variadic_templates)
132# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
133#endif
134
135// Clang always supports variadic macros
136// Clang always supports extern templates
137
138#ifndef BOOST_COMPILER
139# define BOOST_COMPILER "Clang version " __clang_version__
140#endif
141
142// Macro used to identify the Clang compiler.
143#define BOOST_CLANG 1
144