36 namespace std _GLIBCXX_VISIBILITY(default)
38 _GLIBCXX_BEGIN_NAMESPACE_VERSION
41 template<
typename _Tp>
45 return reinterpret_cast<_Tp*
>
46 (&
const_cast<char&
>(
reinterpret_cast<const volatile char&
>(__r)));
49 _GLIBCXX_END_NAMESPACE_VERSION
52 #ifdef __GXX_EXPERIMENTAL_CXX0X__
55 namespace std _GLIBCXX_VISIBILITY(default)
57 _GLIBCXX_BEGIN_NAMESPACE_VERSION
60 template<
typename _Tp>
62 forward(
typename std::remove_reference<_Tp>::type& __t)
63 {
return static_cast<_Tp&&
>(__t); }
65 template<
typename _Tp>
67 forward(
typename std::remove_reference<_Tp>::type&& __t)
70 " substituting _Tp is an lvalue reference type");
71 return static_cast<_Tp&&
>(__t);
80 template<
typename _Tp>
81 inline typename std::remove_reference<_Tp>::type&&
83 {
return static_cast<typename std::remove_reference<_Tp>::type&&
>(__t); }
94 template<
typename _Tp>
97 {
return std::__addressof(__r); }
99 _GLIBCXX_END_NAMESPACE_VERSION
102 #define _GLIBCXX_MOVE(__val) std::move(__val)
103 #define _GLIBCXX_FORWARD(_Tp, __val) std::forward<_Tp>(__val)
105 #define _GLIBCXX_MOVE(__val) (__val)
106 #define _GLIBCXX_FORWARD(_Tp, __val) (__val)
109 namespace std _GLIBCXX_VISIBILITY(default)
111 _GLIBCXX_BEGIN_NAMESPACE_VERSION
120 template<
typename _Tp>
122 swap(_Tp& __a, _Tp& __b)
125 __glibcxx_function_requires(_SGIAssignableConcept<_Tp>)
127 _Tp __tmp = _GLIBCXX_MOVE(__a);
128 __a = _GLIBCXX_MOVE(__b);
129 __b = _GLIBCXX_MOVE(__tmp);
134 template<
typename _Tp,
size_t _Nm>
136 swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
138 for (
size_t __n = 0; __n < _Nm; ++__n)
139 swap(__a[__n], __b[__n]);
142 _GLIBCXX_END_NAMESPACE_VERSION