STD::__BASIC_FUTURE(3cxx)

πŸ’… NAME πŸ’…

Okay so bestie, welcome to the std::__basic_future< _Res >(3cxx) page β€” manual name folded in right here at the top, as requested. This class is the common implementation for future and shared_future. Like, the shared guts. Periodt. πŸ’–

✨ SYNOPSIS ✨

#include <future>
  • Inherits __future_base.
  • Inherited by std::future< _Res >, and std::shared_future< _Res >.

πŸ“£ Public Member Functions πŸ“£

  • __basic_future (const __basic_future &)=delete β€” copy constructor is literally deleted, no cap.
  • __basic_future & operator= (const __basic_future &)=delete β€” copy assignment is also deleted. Not me gatekeeping, that's the listing.
  • bool valid () const noexcept β€” the page lists it exactly like this, no extra blurb attached.
  • void wait () const β€” same vibe: here's the signature, that's the tea.
  • template<typename _Rep , typename _Period > future_status wait_for (const chrono::duration< _Rep, _Period > &__rel) const β€” template-tastic, and the signature is the whole story on this page.
  • template<typename _Clock , typename _Duration > future_status wait_until (const chrono::time_point< _Clock, _Duration > &__abs) const β€” another template-heavy one, copied character for character.
🚨 Copying is deleted, bestie β€” __basic_future (const __basic_future &)=delete and __basic_future & operator= (const __basic_future &)=delete. That's not a suggestion, that's the actual listing. πŸ’€

πŸ›‘οΈ Protected Types πŸ›‘οΈ

  • __result_type β€” typedef __future_base::_Result< _Res > & __result_type
  • __state_type β€” typedef shared_ptr< _State_base > __state_type

πŸ” Protected Member Functions πŸ”

  • __basic_future (const __state_type &__state) β€” protected constructor, listed with no extra prose.
  • __basic_future (const shared_future< _Res > &) noexcept β€” protected constructor, noexcept included.
  • __basic_future (future< _Res > &&) noexcept β€” protected move-ish constructor from future< _Res > &&, noexcept included.
  • __basic_future (shared_future< _Res > &&) noexcept β€” protected move-ish constructor from shared_future< _Res > &&, noexcept included.
  • __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 β€” protected swap, noexcept, exactly as listed.

🌸 Detailed Description 🌸

template<typename _Res>
       class std::__basic_future< _Res >"Common implementation for future and
       shared_future.

The vibe is literally right there in the description: β€œCommon implementation for future and shared_future.” It's giving shared infrastructure, main character energy for the future family. πŸ‘‘

πŸ“š Member Function Documentation πŸ“š

🌟 _M_get_result

template<typename _Res > __result_type std::__basic_future< _Res >::_M_get_result () const [inline],  [protected]

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

References std::rethrow_exception(). πŸ”₯

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code.


πŸ’– That's the whole page, bestie β€” source/version is libstdc++, page is std::__basic_future< _Res >(3cxx), and the footer has no date, so I'm not inventing one. 🫢

πŸ“¦ where this page comes from