34#if __cplusplus < 201103L
40namespace std _GLIBCXX_VISIBILITY(default)
42_GLIBCXX_BEGIN_NAMESPACE_VERSION
49 template<
typename _Tp>
50 inline _GLIBCXX_CONSTEXPR _Tp*
52 {
return __builtin_addressof(__r); }
54#if __cplusplus >= 201103L
67 template<
typename _Tp>
70 forward(
typename std::remove_reference<_Tp>::type& __t)
noexcept
71 {
return static_cast<_Tp&&
>(__t); }
79 template<
typename _Tp>
82 forward(
typename std::remove_reference<_Tp>::type&& __t)
noexcept
85 "std::forward must not be used to convert an rvalue to an lvalue");
86 return static_cast<_Tp&&
>(__t);
94 template<
typename _Tp>
96 constexpr typename std::remove_reference<_Tp>::type&&
98 {
return static_cast<typename std::remove_reference<_Tp>::type&&
>(__t); }
101 template<
typename _Tp>
102 struct __move_if_noexcept_cond
103 :
public __and_<__not_<is_nothrow_move_constructible<_Tp>>,
104 is_copy_constructible<_Tp>>::type { };
114 template<
typename _Tp>
117 __conditional_t<__move_if_noexcept_cond<_Tp>::value,
const _Tp&, _Tp&&>
123#if __cplusplus > 201402L
126# define __cpp_lib_addressof_constexpr 201603L
135 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>
150 __exchange(_Tp& __obj, _Up&& __new_val)
153 __obj = std::forward<_Up>(__new_val);
159#define _GLIBCXX_FWDREF(_Tp) _Tp&&
160#define _GLIBCXX_MOVE(__val) std::move(__val)
161#define _GLIBCXX_FORWARD(_Tp, __val) std::forward<_Tp>(__val)
163#define _GLIBCXX_FWDREF(_Tp) const _Tp&
164#define _GLIBCXX_MOVE(__val) (__val)
165#define _GLIBCXX_FORWARD(_Tp, __val) (__val)
179 template<
typename _Tp>
182#if __cplusplus >= 201103L
183 typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>,
184 is_move_constructible<_Tp>,
185 is_move_assignable<_Tp>>::value>::type
193#if __cplusplus < 201103L
195 __glibcxx_function_requires(_SGIAssignableConcept<_Tp>)
197 _Tp __tmp = _GLIBCXX_MOVE(__a);
198 __a = _GLIBCXX_MOVE(__b);
199 __b = _GLIBCXX_MOVE(__tmp);
205 template<
typename _Tp,
size_t _Nm>
208#if __cplusplus >= 201103L
209 typename enable_if<__is_swappable<_Tp>::value>::type
213 swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
214 _GLIBCXX_NOEXCEPT_IF(__is_nothrow_swappable<_Tp>::value)
216 for (
size_t __n = 0; __n < _Nm; ++__n)
217 swap(__a[__n], __b[__n]);
221_GLIBCXX_END_NAMESPACE_VERSION
constexpr __conditional_t< __move_if_noexcept_cond< _Tp >::value, const _Tp &, _Tp && > move_if_noexcept(_Tp &__x) noexcept
Conditionally convert a value to an rvalue.
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 std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.
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.
is_nothrow_move_constructible
is_nothrow_move_assignable