36namespace std _GLIBCXX_VISIBILITY(default)
38_GLIBCXX_BEGIN_NAMESPACE_VERSION
45 template<
typename _Tp>
46 inline _GLIBCXX_CONSTEXPR _Tp*
50#if __cplusplus >= 201103L
52_GLIBCXX_END_NAMESPACE_VERSION
57namespace std _GLIBCXX_VISIBILITY(default)
59_GLIBCXX_BEGIN_NAMESPACE_VERSION
72 template<
typename _Tp>
75 {
return static_cast<_Tp&&
>(__t); }
83 template<
typename _Tp>
88 " substituting _Tp is an lvalue reference type");
89 return static_cast<_Tp&&
>(__t);
97 template<
typename _Tp>
99 move(_Tp&& __t)
noexcept
103 template<
typename _Tp>
104 struct __move_if_noexcept_cond
105 :
public __and_<__not_<is_nothrow_move_constructible<_Tp>>,
106 is_copy_constructible<_Tp>>::type { };
116 template<
typename _Tp>
118 conditional<__move_if_noexcept_cond<_Tp>::value,
const _Tp&, _Tp&&>::type
120 {
return std::move(__x); }
124#if __cplusplus > 201402L
127# define __cpp_lib_addressof_constexpr 201603
136 template<
typename _Tp>
137 inline _GLIBCXX17_CONSTEXPR _Tp*
143 template<
typename _Tp>
144 const _Tp*
addressof(
const _Tp&&) =
delete;
147 template <
typename _Tp,
typename _Up = _Tp>
149 __exchange(_Tp& __obj, _Up&& __new_val)
151 _Tp __old_val = std::move(__obj);
158#define _GLIBCXX_MOVE(__val) std::move(__val)
159#define _GLIBCXX_FORWARD(_Tp, __val) std::forward<_Tp>(__val)
161#define _GLIBCXX_MOVE(__val) (__val)
162#define _GLIBCXX_FORWARD(_Tp, __val) (__val)
176 template<
typename _Tp>
178#if __cplusplus >= 201103L
179 typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>,
180 is_move_constructible<_Tp>,
181 is_move_assignable<_Tp>>::value>::type
182 swap(_Tp& __a, _Tp& __b)
187 swap(_Tp& __a, _Tp& __b)
193 _Tp
__tmp = _GLIBCXX_MOVE(__a);
194 __a = _GLIBCXX_MOVE(__b);
195 __b = _GLIBCXX_MOVE(
__tmp);
201 template<
typename _Tp,
size_t _Nm>
203#if __cplusplus >= 201103L
204 typename enable_if<__is_swappable<_Tp>::value>::type
206 noexcept(__is_nothrow_swappable<_Tp>::value)
209 swap(_Tp (&__a)[
_Nm], _Tp (&__b)[
_Nm])
212 for (
size_t __n = 0; __n <
_Nm; ++__n)
213 swap(__a[__n], __b[__n]);
217_GLIBCXX_END_NAMESPACE_VERSION
_GLIBCXX17_CONSTEXPR _Tp * addressof(_Tp &__r) noexcept
Returns the actual address of the object or function referenced by r, even in the presence of an over...
constexpr conditional< __move_if_noexcept_cond< _Tp >::value, const_Tp &, _Tp && >::type move_if_noexcept(_Tp &__x) noexcept
Conditionally convert a value to an rvalue.
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) noexcept
Forward an lvalue.
ISO C++ entities toplevel namespace is std.