summaryrefslogtreecommitdiff
path: root/boost/config/compiler/clang.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/config/compiler/clang.hpp')
-rw-r--r--boost/config/compiler/clang.hpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/boost/config/compiler/clang.hpp b/boost/config/compiler/clang.hpp
index 175229c64a..157a94d267 100644
--- a/boost/config/compiler/clang.hpp
+++ b/boost/config/compiler/clang.hpp
@@ -27,6 +27,10 @@
#define __has_attribute(x) 0
#endif
+#ifndef __has_cpp_attribute
+#define __has_cpp_attribute(x) 0
+#endif
+
#if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS)
# define BOOST_NO_EXCEPTIONS
#endif
@@ -282,6 +286,16 @@
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+
+// Clang 3.9+ in c++1z
+#if !__has_cpp_attribute(fallthrough) || __cplusplus < 201406L
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
+
#if __cplusplus < 201103L
#define BOOST_NO_CXX11_SFINAE_EXPR
#endif
@@ -296,6 +310,11 @@
#define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable();
#endif
+#if (__clang_major__ == 3) && (__clang_minor__ == 0)
+// Apparently a clang bug:
+# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
+#endif
+
// Clang has supported the 'unused' attribute since the first release.
#define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__))