]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/contract/test/specify/auto_pre_old_post_error.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / contract / test / specify / auto_pre_old_post_error.cpp
index 7fa097b3fc0c92a077d3e19e958e0bbfde427f80..6d0302ffd5dc9e01d5c7497dfa7aec44966c26f4 100644 (file)
@@ -6,6 +6,13 @@
 
 // Test auto error after post (for free func, but same for all contracts).
 
+#include <boost/config.hpp>
+// Not just __cplusplus to detect C++17 as MSVC defines it correctly sometimes.
+#if     (defined(__cplusplus) && __cplusplus >= 201703L) || \
+        !defined(BOOST_NO_CXX17_IF_CONSTEXPR)
+    #error "C++17 copy elision invalidates test so forcing expected failure"
+#else
+
 #include <boost/contract/function.hpp>
 
 int main() {
@@ -17,3 +24,5 @@ int main() {
     return 0;
 }
 
+#endif
+