libstdc++
GNU C++ library
Loading...
Searching...
No Matches

◆ __exchange()

template<typename _Tp, typename _Up = _Tp>
_Tp std::__exchange ( _Tp & __obj,
_Up && __new_val )
inlineconstexpr

Definition at line 188 of file move.h.

189 {
190 _Tp __old_val = std::move(__obj);
191 __obj = std::forward<_Up>(__new_val);
192 return __old_val;
193 }
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:138
constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) noexcept
Forward an lvalue.
Definition move.h:72

References __exchange(), forward(), and move().

Referenced by std::basic_filebuf< _CharT, _Traits >::basic_filebuf(), std::copyable_function< _Res(_ArgTypes...) _GLIBCXX_MOF_CV noexcept(_Noex)>::copyable_function(), std::copyable_function< _Res(_ArgTypes...) _GLIBCXX_MOF_CV noexcept(_Noex)>::copyable_function(), std::move_only_function< _Res(_ArgTypes...) _GLIBCXX_MOF_CV noexcept(_Noex)>::move_only_function(), std::move_only_function< _Res(_ArgTypes...) _GLIBCXX_MOF_CV noexcept(_Noex)>::move_only_function(), __exchange(), std::__unicode::_Utf_iterator< ranges::range_value_t< _View >, _ToFormat, ranges::iterator_t< _View >, ranges::sentinel_t< _View > >::_M_read_reverse_utf8(), __gnu_cxx::stdio_sync_filebuf< _CharT, _Traits >::operator=(), std::basic_filebuf< _CharT, _Traits >::operator=(), std::copyable_function< _Res(_ArgTypes...) _GLIBCXX_MOF_CV noexcept(_Noex)>::operator=(), std::move_only_function< _Res(_ArgTypes...) _GLIBCXX_MOF_CV noexcept(_Noex)>::operator=(), and std::shared_lock< _Mutex >::release().

Here is the call graph for this function:
Here is the caller graph for this function: