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
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms