STD::MOVE_SENTINEL(3cxx)

πŸ“¦
version 16-20260322 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

✨ NAME ✨

std::move_sentinel< _Sent > β€” bestie, it's a sentinel adaptor for use with std::move_iterator. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <iterator>

πŸ‘‘ Public Member Functions

  • constexpr move_sentinel(_Sent __s) β€” lowkey just builds one straight from a _Sent. It's noexcept(is_nothrow_move_constructible_v< _Sent >) because ofc it is, we love a conditional noexcept. ✨
  • template<typename _S2> requires convertible_to<const _S2&, _Sent> constexpr move_sentinel(const move_sentinel< _S2 >& __s) β€” the copy-ish converter, turning a move_sentinel< _S2 > into a move_sentinel< _Sent >. Only exists when const _S2& is convertible_to _Sent, and it's noexcept(is_nothrow_constructible_v< _Sent, const _S2& >). fr fr. πŸ¦‹
  • constexpr _Sent base() const noexcept(is_nothrow_copy_constructible_v< _Sent >) β€” hands you back the underlying _Sent, no cap. Guarded by noexcept(is_nothrow_copy_constructible_v< _Sent >). πŸ’–
  • template<typename _S2> requires assignable_from<_Sent&, const _S2&> constexpr move_sentinel& operator=(const move_sentinel< _S2 >& __s) β€” the assignment glow-up, works when _Sent& is assignable_from const _S2&. Its noexcept is is_nothrow_assignable_v< _Sent, const _S2& >. periodt. 🫢

πŸ’œ Detailed Description πŸ’œ

template<semiregular _Sent>
class std::move_sentinel< _Sent >

A sentinel adaptor for use with std::move_iterator. That's it, that's the whole vibe β€” it's giving "I exist so your move iterators have a matching sentinel to vibe-check against." 🌸 Not me being obsessed with a tiny adaptor class. 😭


🌈 Author 🌈

Generated automatically by Doxygen for libstdc++ from the source code. The robots wrote this one, bestie β€” I'm just the messenger. πŸ€–βœ¨


Okayyy that's the whole page! This one's from libstdc++, covering std::move_sentinel< _Sent > in section 3cxx β€” mwah, go forth and move-iterate responsibly. πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from