utility.hpp
Go to the documentation of this file.
1 //
3 // (C) Copyright Ion Gaztanaga 2012-2012.
4 // Distributed under the Boost Software License, Version 1.0.
5 // (See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7 //
8 // See http://www.boost.org/libs/move for documentation.
9 //
11 
15 
16 #ifndef BOOST_MOVE_MOVE_UTILITY_HPP
17 #define BOOST_MOVE_MOVE_UTILITY_HPP
18 
19 #ifndef BOOST_CONFIG_HPP
20 # include <boost/config.hpp>
21 #endif
22 #
23 #if defined(BOOST_HAS_PRAGMA_ONCE)
24 # pragma once
25 #endif
26 
29 #include <boost/move/traits.hpp>
30 
31 #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
32 
33  namespace boost {
34 
36  //
37  // move_if_noexcept()
38  //
40 
41  template <class T>
42  inline typename ::boost::move_detail::enable_if_c
45  >::type
47  {
48  return x;
49  }
50 
51  template <class T>
52  inline typename ::boost::move_detail::enable_if_c
56  {
57  return *static_cast<rv<T>* >(::boost::move_detail::addressof(x));
58  }
59 
60  template <class T>
61  inline typename ::boost::move_detail::enable_if_c
63  && ::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value
64  , rv<T>&
65  >::type
67  {
68  return x;
69  }
70 
71  template <class T>
72  inline typename ::boost::move_detail::enable_if_c
74  && !::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value
76  >::type
78  {
79  return x;
80  }
81 
82  template <class T>
83  inline typename ::boost::move_detail::enable_if_c
85  && !::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value
87  >::type
89  {
90  return x;
91  }
92 
93  } //namespace boost
94 
95 #else //#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
96 
97  #if defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE)
98  #include <utility>
99 
100  namespace boost{
101 
103 
104  } //namespace boost
105 
106  #else
107 
108  namespace boost {
109 
111  //
112  // move_if_noexcept()
113  //
115  #if defined(BOOST_MOVE_DOXYGEN_INVOKED)
116  template <class T>
123  rvalue_reference_or_const_lvalue_reference move_if_noexcept(input_reference) noexcept;
124 
125  #else //BOOST_MOVE_DOXYGEN_INVOKED
126 
127  template <class T>
128  typename ::boost::move_detail::enable_if_c
131  { return ::boost::move(x); }
132 
133  template <class T>
134  typename ::boost::move_detail::enable_if_c
135  < !::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value, const T&>::type
137  { return x; }
138 
139  #endif //BOOST_MOVE_DOXYGEN_INVOKED
140 
141  } //namespace boost {
142 
143  #endif //#if defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE)
144 
145 #endif //BOOST_NO_CXX11_RVALUE_REFERENCES
146 
148 
149 #endif //#ifndef BOOST_MOVE_MOVE_UTILITY_HPP
BOOST_FORCEINLINE T * addressof(T &v)
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
typename::boost::move_detail::enable_if_c< ::boost::move_detail::is_nothrow_move_constructible_or_uncopyable< T >::value, T && >::type move_if_noexcept(T &x) BOOST_NOEXCEPT
Definition: utility.hpp:130
static const bool value
Definition: core.hpp:295
GLdouble x
#define BOOST_NOEXCEPT
Definition: suffix.hpp:916
GLenum type
typename::boost::move_detail::remove_reference< T >::type && move(T &&t) BOOST_NOEXCEPT
typename::boost::move_detail::enable_if_c< !::boost::move_detail::is_nothrow_move_constructible_or_uncopyable< T >::value, const T & >::type move_if_noexcept(T &x) BOOST_NOEXCEPT
Definition: utility.hpp:136


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