Imported Upstream version 1.72.0
[platform/upstream/boost.git] / boost / config / detail / suffix.hpp
index 86f6081..47e139b 100644 (file)
@@ -943,6 +943,14 @@ namespace std{ using ::type_info; }
 //  ------------------ End of deprecated macros for 1.51 ---------------------------
 
 
+//
+// Helper macro for marking types and methods final
+//
+#if !defined(BOOST_NO_CXX11_FINAL)
+#  define BOOST_FINAL final
+#else
+#  define BOOST_FINAL
+#endif
 
 //
 // Helper macros BOOST_NOEXCEPT, BOOST_NOEXCEPT_IF, BOOST_NOEXCEPT_EXPR
@@ -987,6 +995,15 @@ namespace std{ using ::type_info; }
 #endif
 
 //
+// C++17 inline variables
+//
+#if !defined(BOOST_NO_CXX17_INLINE_VARIABLES)
+#define BOOST_INLINE_VARIABLE inline
+#else
+#define BOOST_INLINE_VARIABLE
+#endif
+
+//
 // Unused variable/typedef workarounds:
 //
 #ifndef BOOST_ATTRIBUTE_UNUSED
@@ -996,7 +1013,8 @@ namespace std{ using ::type_info; }
 // [[nodiscard]]:
 //
 #ifdef __has_cpp_attribute
-#if __has_cpp_attribute(nodiscard)
+// clang-6 accepts [[nodiscard]] with -std=c++14, but warns about it -pedantic
+#if __has_cpp_attribute(nodiscard) && !(defined(__clang__) && (__cplusplus < 201703L))
 # define BOOST_ATTRIBUTE_NODISCARD [[nodiscard]]
 #endif
 #if __has_cpp_attribute(no_unique_address) && !(defined(__GNUC__) && (__cplusplus < 201100))
@@ -1041,7 +1059,8 @@ namespace std{ using ::type_info; }
 #endif
 
 // This is a catch all case for obsolete compilers / std libs:
-#if !defined(__has_include)
+#if !defined(_YVALS) && !defined(_CPPLIB_VER)  // msvc std lib already configured
+#if (!defined(__has_include) || (__cplusplus < 201700))
 #  define BOOST_NO_CXX17_HDR_OPTIONAL
 #  define BOOST_NO_CXX17_HDR_STRING_VIEW
 #  define BOOST_NO_CXX17_HDR_VARIANT
@@ -1056,6 +1075,7 @@ namespace std{ using ::type_info; }
 #  define BOOST_NO_CXX17_HDR_VARIANT
 #endif
 #endif
+#endif
 
 //
 // Finish off with checks for macros that are depricated / no longer supported,