summaryrefslogtreecommitdiff
path: root/boost/config/compiler/gcc.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/config/compiler/gcc.hpp')
-rw-r--r--boost/config/compiler/gcc.hpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/boost/config/compiler/gcc.hpp b/boost/config/compiler/gcc.hpp
index c82cbc7eda..d1cfed7a32 100644
--- a/boost/config/compiler/gcc.hpp
+++ b/boost/config/compiler/gcc.hpp
@@ -288,6 +288,28 @@
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif
+// C++17
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+#endif
+#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
+
+#if __GNUC__ >= 7
+# define BOOST_FALLTHROUGH __attribute__((fallthrough))
+#endif
+
+#ifdef __MINGW32__
+// Currently (June 2017) thread_local is broken on mingw for all current compiler releases, see
+// https://sourceforge.net/p/mingw-w64/bugs/527/
+// Not setting this causes program termination on thread exit.
+#define BOOST_NO_CXX11_THREAD_LOCAL
+#endif
+
//
// Unused attribute:
#if __GNUC__ >= 4