has_nothrow_assign.hpp
Go to the documentation of this file.
1 
2 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
3 // Use, modification and distribution are subject to the Boost Software License,
4 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt).
6 //
7 // See http://www.boost.org/libs/type_traits for most recent version including documentation.
8 
9 #ifndef BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED
10 #define BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED
11 
12 #include <cstddef> // size_t
15 
16 #if !defined(BOOST_HAS_NOTHROW_ASSIGN) || defined(BOOST_MSVC) || defined(BOOST_INTEL)
18 #if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
26 #endif
27 #endif
28 #if defined(__GNUC__) || defined(__SUNPRO_CC) || defined(__clang__)
33 #ifdef BOOST_INTEL
35 #endif
36 #endif
37 
38 namespace boost {
39 
40 #if !defined(BOOST_HAS_NOTHROW_ASSIGN) && !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
41 
42  namespace detail
43  {
44  template <class T, bool b1, bool b2> struct has_nothrow_assign_imp{ static const bool value = false; };
45  template <class T> struct has_nothrow_assign_imp<T, false, true>{ static const bool value = noexcept(boost::declval<typename add_reference<T>::type>() = boost::declval<typename add_reference<T const>::type>()); };
46  template <class T, std::size_t N> struct has_nothrow_assign_imp<T[N], false, true>{ static const bool value = has_nothrow_assign_imp<T, false, true>::value; };
47  template <class T> struct has_nothrow_assign_imp<T[], false, true>{ static const bool value = has_nothrow_assign_imp<T, false, true>::value; };
48  }
49 
50 #endif
51 
52  template <class T>
53  struct has_nothrow_assign : public integral_constant < bool,
54 #ifndef BOOST_HAS_NOTHROW_ASSIGN
55 #if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
56  // Portable C++11 version:
57  detail::has_nothrow_assign_imp<T,
58  (is_const<typename remove_reference<T>::type>::value || is_volatile<typename remove_reference<T>::type>::value || is_reference<T>::value),
59  is_assignable<typename add_reference<T>::type, typename add_reference<const T>::type>::value
60  >::value
61 #else
62  ::boost::has_trivial_assign<T>::value
63 #endif
64 #else
65  BOOST_HAS_NOTHROW_ASSIGN(T)
66 #endif
67  > {};
68 
69 template <class T, std::size_t N> struct has_nothrow_assign <T[N]> : public has_nothrow_assign<T> {};
70 template <> struct has_nothrow_assign<void> : public false_type{};
71 template <class T> struct has_nothrow_assign<T volatile> : public false_type{};
72 template <class T> struct has_nothrow_assign<T&> : public false_type{};
73 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
74 template <class T> struct has_nothrow_assign<T&&> : public false_type{};
75 #endif
76 #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
77 template <> struct has_nothrow_assign<void const> : public false_type{};
78 template <> struct has_nothrow_assign<void const volatile> : public false_type{};
79 template <> struct has_nothrow_assign<void volatile> : public false_type{};
80 #endif
81 
82 } // namespace boost
83 
84 #endif // BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED
typedef void(APIENTRY *GLDEBUGPROC)(GLenum source
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
GLfloat value
add_rvalue_reference< T >::type declval() BOOST_NOEXCEPT
const char * detail
boost::detail::add_reference_impl< T >::type type


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:16