STD::SHARED_FUTURE(3cxx)

✨ std::shared_future< _Res > ✨

okay so bestie, you're reading the std::shared_future< _Res >(3cxx) page and we are gonna go through it together like a group chat πŸ’– every tiny detail is staying, no cap.

🌸 NAME 🌸

std::shared_future< _Res > β€” Primary template for shared_future.

πŸ¦‹ SYNOPSIS πŸ¦‹

#include <future>

Inherits std::__basic_future< _Res >. slay.

πŸ’… Public Member Functions πŸ’…

  • shared_future (const shared_future &__sf) noexcept β€” Copy constructor. periodt.
  • shared_future (future< _Res > &&__uf) noexcept β€” Construct from a future rvalue.
  • shared_future (shared_future &&__sf) noexcept β€” Construct from a shared_future rvalue.
  • const _Res & get () const β€” Retrieving the value.
  • shared_future & operator= (const shared_future &__sf) noexcept β€” the docs just drop the signature here, no extra description.
  • shared_future & operator= (shared_future &&__sf) noexcept β€” same energy: signature only.
  • bool valid () const noexcept β€” signature only in the original.
  • void wait () const β€” signature only in the original.
  • wait_for β€” exact signature:
template<typename _Rep , typename _Period > future_status wait_for
    (const chrono::duration< _Rep, _Period > &__rel) const
  • wait_until β€” exact signature:
template<typename _Clock , typename _Duration > future_status wait_until
    (const chrono::time_point< _Clock, _Duration > &__abs) const

πŸŽ€ Protected Types πŸŽ€

  • typedef __future_base::_Result< _Res > & __result_type β€” protected type, exact.
  • typedef shared_ptr< _State_base > __state_type β€” protected type, exact.

πŸ’œ Protected Member Functions πŸ’œ

  • __result_type _M_get_result () const β€” Wait for the state to be ready and rethrow any stored exception.
  • void _M_swap (__basic_future &__that) noexcept β€” signature only in the original, bestie.

πŸ’« Detailed Description πŸ’«

template<typename _Res>
    class std::shared_future< _Res >"Primary template for shared_future.

yes, that's exactly what it says, including that little quote mark after the > β€” I'm not fixing it, I'm just reporting the vibes πŸ’€

🧚 Constructor & Destructor Documentation 🧚

  • Copy constructor β€” exact signature:
template<typename _Res > std::shared_future< _Res >::shared_future (const
    shared_future< _Res > & __sf) [inline],  [noexcept]

Copy constructor.

  • Construct from a future rvalue β€” exact signature:
template<typename _Res > std::shared_future< _Res >::shared_future (future<
    _Res > && __uf) [inline],  [noexcept]

Construct from a future rvalue.

  • Construct from a shared_future rvalue β€” exact signature:
template<typename _Res > std::shared_future< _Res >::shared_future
    (shared_future< _Res > && __sf) [inline],  [noexcept]

Construct from a shared_future rvalue.

πŸ”₯ Member Function Documentation πŸ”₯

  • _M_get_result β€” exact signature:
template<typename _Res > __result_type std::__basic_future< _Res
    >::_M_get_result () const [inline],  [protected],  [inherited]

Wait for the state to be ready and rethrow any stored exception.

References std::rethrow_exception().

  • get β€” exact signature:
template<typename _Res > const _Res & std::shared_future< _Res >::get ()
    const [inline]

Retrieving the value.

πŸ‘‘ Author πŸ‘‘

The Author section is literally: Generated automatically by Doxygen for libstdc++ from the source code.


cute sign-off time 🫢 the footer's source/version is libstdc++, the page is std::shared_future< _Res >(3cxx), and there's no date printed in that footer, so I'm not inventing one β€” that's the whole footer vibe, bestie πŸ’œ

πŸ“¦ where this page comes from