]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/pfr/detail/config.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / pfr / detail / config.hpp
index 55f2bff4ce03a84430a41e744136f9547b97d4bc..8a1ac7dcc1e30072ebfe1f50e4c5c056050112b5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (c) 2016-2020 Antony Polukhin
+// Copyright (c) 2016-2022 Antony Polukhin
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 #           define BOOST_PFR_USE_CPP17 1
 #       else
 #           define BOOST_PFR_USE_CPP17 0
-#           if !BOOST_PFR_USE_LOOPHOLE
-#               error Boost.PFR requires /std:c++latest or /std:c++17 flags on your compiler.
-#           endif
 #       endif
 #   else
 #       define BOOST_PFR_USE_CPP17 0
 #   endif
 #endif
 
+#if (!BOOST_PFR_USE_CPP17 && !BOOST_PFR_USE_LOOPHOLE)
+#   if (defined(_MSC_VER) && _MSC_VER < 1916) ///< in Visual Studio 2017 v15.9 PFR library with classic engine normally works
+#      error Boost.PFR requires /std:c++latest or /std:c++17 flags on your compiler.
+#   endif
+#endif
+
 #ifndef BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE
 // Assume that libstdc++ since GCC-7.3 does not have linear instantiation depth in std::make_integral_sequence
 #   if defined( __GLIBCXX__) && __GLIBCXX__ >= 20180101
 #   endif
 #endif
 
+#ifndef BOOST_PFR_HAS_GUARANTEED_COPY_ELISION
+#   if  defined(__cpp_guaranteed_copy_elision) && (!defined(_MSC_VER) || _MSC_VER > 1928)
+#       define BOOST_PFR_HAS_GUARANTEED_COPY_ELISION 1
+#   else
+#       define BOOST_PFR_HAS_GUARANTEED_COPY_ELISION 0
+#   endif
+#endif
+
 #if defined(__has_cpp_attribute)
 #   if __has_cpp_attribute(maybe_unused)
 #       define BOOST_PFR_MAYBE_UNUSED [[maybe_unused]]