move/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 
28 #include <boost/move/detail/workaround.hpp> //forceinline
30 #include <boost/move/traits.hpp>
31 
32 #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
33 
34  namespace boost {
35 
37  //
38  // move_if_noexcept()
39  //
41 
42  template <class T>
43  BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
45  , typename ::boost::move_detail::add_const<T>::type &
46  >::type
48  {
49  return x;
50  }
51 
52  template <class T>
53  BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
57  {
58  return *static_cast<rv<T>* >(::boost::move_detail::addressof(x));
59  }
60 
61  template <class T>
62  BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
65  , rv<T>&
66  >::type
68  {
69  return x;
70  }
71 
72  template <class T>
73  BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
76  , typename ::boost::move_detail::add_const<T>::type &
77  >::type
79  {
80  return x;
81  }
82 
83  template <class T>
84  BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
87  , typename ::boost::move_detail::add_const<T>::type &
88  >::type
90  {
91  return x;
92  }
93 
94  } //namespace boost
95 
96 #else //#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
97 
98  #if defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE)
99  #include <utility>
100 
101  namespace boost{
102 
104 
105  } //namespace boost
106 
107  #else
108 
109  namespace boost {
110 
112  //
113  // move_if_noexcept()
114  //
116  #if defined(BOOST_MOVE_DOXYGEN_INVOKED)
117  template <class T>
124  rvalue_reference_or_const_lvalue_reference move_if_noexcept(input_reference) noexcept;
125 
126  #else //BOOST_MOVE_DOXYGEN_INVOKED
127 
128  template <class T>
129  BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
132  { return ::boost::move(x); }
133 
134  template <class T>
135  BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
138  { return x; }
139 
140  #endif //BOOST_MOVE_DOXYGEN_INVOKED
141 
142  } //namespace boost {
143 
144  #endif //#if defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE)
145 
146 #endif //BOOST_NO_CXX11_RVALUE_REFERENCES
147 
149 
150 #endif //#ifndef BOOST_MOVE_MOVE_UTILITY_HPP
BOOST_MOVE_FORCEINLINE
#define BOOST_MOVE_FORCEINLINE
Definition: move/detail/workaround.hpp:58
T
T
Definition: mem_fn_cc.hpp:25
config.hpp
boost::move_if_noexcept
BOOST_MOVE_FORCEINLINE ::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: move/utility.hpp:131
boost
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
boost::addressof
BOOST_FORCEINLINE T * addressof(T &v)
Definition: core/addressof.hpp:108
workaround.hpp
boost::has_move_emulation_enabled::value
static const bool value
Definition: core.hpp:326
utility_core.hpp
BOOST_NOEXCEPT
#define BOOST_NOEXCEPT
Definition: suffix.hpp:938
boost::move_if_noexcept
BOOST_MOVE_FORCEINLINE ::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: move/utility.hpp:137
traits.hpp
config_begin.hpp
boost::move_detail::is_nothrow_move_constructible_or_uncopyable
Definition: move/traits.hpp:63
config_end.hpp
boost::move
BOOST_MOVE_FORCEINLINE ::boost::move_detail::remove_reference< T >::type && move(T &&t) BOOST_NOEXCEPT
Definition: utility_core.hpp:212
boost::enable_move_utility_emulation::value
static const bool value
Definition: utility_core.hpp:185


sick_visionary_ros
Author(s): SICK AG TechSupport 3D Snapshot
autogenerated on Thu Feb 8 2024 03:48:46