]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/optional/detail/experimental_traits.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / optional / detail / experimental_traits.hpp
index 6eded5886ec742e3f436f0270a1cbb826d06edf6..b51f5f104491bded5a35414b2a5d840181b83f82 100644 (file)
@@ -14,9 +14,8 @@
 
 #include <boost/config.hpp>
 #include <boost/detail/workaround.hpp>
+#include <boost/predef.h>
 #include <boost/type_traits.hpp>
-
-namespace boost { namespace optional_detail {
   
 // The condition to use POD implementation
 
@@ -40,11 +39,16 @@ namespace boost { namespace optional_detail {
 # define BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
 #endif
 
+// GCC 5 or higher, or clang with libc++ or clang with libstdc++ 5 or higher
 #if __cplusplus >= 201103L
 #  if BOOST_WORKAROUND(BOOST_GCC, >= 50000)
 #    define BOOST_OPTIONAL_DETAIL_USE_STD_TYPE_TRAITS
 #  elif (defined BOOST_CLANG)
-#    define BOOST_OPTIONAL_DETAIL_USE_STD_TYPE_TRAITS
+#    if BOOST_LIB_STD_CXX > 0
+#      define BOOST_OPTIONAL_DETAIL_USE_STD_TYPE_TRAITS
+#    elif BOOST_LIB_STD_GNU >= 441200023 && BOOST_LIB_STD_GNU != 450600023 && BOOST_LIB_STD_GNU != 450600026 && BOOST_LIB_STD_GNU != 460800003 && BOOST_LIB_STD_GNU != 450400026 && BOOST_LIB_STD_GNU != 460700026
+#      define BOOST_OPTIONAL_DETAIL_USE_STD_TYPE_TRAITS
+#    endif
 #  endif
 #endif  
 
@@ -52,10 +56,12 @@ namespace boost { namespace optional_detail {
 #ifndef BOOST_OPTIONAL_DETAIL_USE_STD_TYPE_TRAITS
 #  define BOOST_OPTIONAL_DETAIL_HAS_TRIVIAL_CTOR(T) BOOST_HAS_TRIVIAL_CONSTRUCTOR(T)
 #else
+#  include <type_traits>
 #  define BOOST_OPTIONAL_DETAIL_HAS_TRIVIAL_CTOR(T) std::is_trivially_default_constructible<T>::value
 #endif
   
   
+namespace boost { namespace optional_detail {
   
 #ifndef BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
 template <typename T>