summaryrefslogtreecommitdiff
path: root/src/third_party/boost-1.60.0/boost/type_traits/has_trivial_copy.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/boost-1.60.0/boost/type_traits/has_trivial_copy.hpp')
-rw-r--r--src/third_party/boost-1.60.0/boost/type_traits/has_trivial_copy.hpp62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/third_party/boost-1.60.0/boost/type_traits/has_trivial_copy.hpp b/src/third_party/boost-1.60.0/boost/type_traits/has_trivial_copy.hpp
new file mode 100644
index 00000000000..9d3265d1dc9
--- /dev/null
+++ b/src/third_party/boost-1.60.0/boost/type_traits/has_trivial_copy.hpp
@@ -0,0 +1,62 @@
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Use, modification and distribution are subject to 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).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED
+#define BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED
+
+#include <boost/type_traits/intrinsics.hpp>
+#include <boost/type_traits/is_pod.hpp>
+#include <boost/type_traits/is_reference.hpp>
+
+#if (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 409)) || defined(BOOST_CLANG) || (defined(__SUNPRO_CC) && defined(BOOST_HAS_TRIVIAL_COPY))
+#include <boost/type_traits/is_copy_constructible.hpp>
+#define BOOST_TT_TRIVIAL_CONSTRUCT_FIX && is_copy_constructible<T>::value
+#else
+#define BOOST_TT_TRIVIAL_CONSTRUCT_FIX
+#endif
+
+#ifdef BOOST_INTEL
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/add_lvalue_reference.hpp>
+#endif
+
+namespace boost {
+
+template <typename T> struct has_trivial_copy
+: public integral_constant<bool,
+#ifdef BOOST_HAS_TRIVIAL_COPY
+ BOOST_HAS_TRIVIAL_COPY(T) BOOST_TT_TRIVIAL_CONSTRUCT_FIX
+#else
+ ::boost::is_pod<T>::value
+#endif
+>{};
+// Arrays are not explicitly copyable:
+template <typename T, std::size_t N> struct has_trivial_copy<T[N]> : public false_type{};
+template <typename T> struct has_trivial_copy<T[]> : public false_type{};
+// Are volatile types ever trivial? We don't really know, so assume not:
+template <typename T> struct has_trivial_copy<T volatile> : public false_type{};
+
+template <> struct has_trivial_copy<void> : public false_type{};
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+template <> struct has_trivial_copy<void const> : public false_type{};
+template <> struct has_trivial_copy<void volatile> : public false_type{};
+template <> struct has_trivial_copy<void const volatile> : public false_type{};
+#endif
+
+template <class T> struct has_trivial_copy<T&> : public false_type{};
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+template <class T> struct has_trivial_copy<T&&> : public false_type{};
+#endif
+
+template <class T> struct has_trivial_copy_constructor : public has_trivial_copy<T>{};
+
+#undef BOOST_TT_TRIVIAL_CONSTRUCT_FIX
+
+} // namespace boost
+
+#endif // BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED