STD::FUTURE(3cxx)
πΈ std::future< _Res > πΈ
okay so bestie, we're in the cxx manual and this page is all about std::future< _Res >. it's giving βprimary template for futureβ energy, and every single signature is preserved below because we do not play about details. π
β¨ NAME β¨
std::future< _Res > β the primary template for future. periodt. π
πΈ SYNOPSIS πΈ
#include <future>
Inherits std::__basic_future< _Res >. π«Ά
π Public Member Functions π
future (const future &)=deleteβ this one is marked=delete; the page gives the signature and no extra blurb. πfuture (future &&__uf) noexceptβ Move constructor. slay, we love a move. β¨_Res get ()β Retrieving the value. the main character function fr fr. πfuture & operator= (const future &)=deleteβ deleted assignment signature, exactly as listed. π«future & operator= (future &&__fut) noexceptβ move assignment signature, no extra description attached. πshared_future< _Res > share () noexceptβshare()is right here, signature only. π«Άbool valid () const noexceptβ thevalid()check, signature only. βvoid wait () constβwait(), signature only. β³template<typename _Rep , typename _Period > future_status wait_for (const chrono::duration< _Rep, _Period > &__rel) constβ thewait_fortemplate, copied exactly with all its template bits. β±οΈtemplate<typename _Clock , typename _Duration > future_status wait_until (const chrono::time_point< _Clock, _Duration > &__abs) constβ thewait_untiltemplate, also copied exactly. π°οΈ
π‘οΈ Protected Types π‘οΈ
typedef __future_base::_Result< _Res > & __result_typeβ protected type alias, kept character for character. π§
π Protected Member Functions π
__result_type _M_get_result () constβ Wait for the state to be ready and rethrow any stored exception. yes, it says βrethrowβ and we respect it. πvoid _M_swap (__basic_future &__that) noexceptβ swappy signature, no extra description on the page. π
π«Ά Friends π«Ά
template<typename _Fn , typename... _Args> future< __async_result_of< _Fn, _Args... > > async (launch, _Fn &&, _Args &&...)β friendasyncdeclaration, exactly as listed. πtemplate<typename > class packaged_taskβ friendpackaged_task, with that space before>preserved. π¦class promise< _Res >β friendpromise< _Res >, right here. π€
π¦ Detailed Description π¦
template<typename _Res>
class std::future< _Res >
Primary template for future. literally the blueprint, no cap. π
tiny detail from the source page: the class line has a little quote-mark artifact in the original text, so I'm keeping that on the record rather than βfixingβ it. bestie, we preserve the lore. π
π Constructor & Destructor Documentation π
π§ future
template<typename _Res > std::future< _Res >::future (future< _Res > && __uf) [inline], [noexcept]
Move constructor. that's it, that's the constructor note. β¨
β Member Function Documentation β
π _M_get_result
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
template<typename _Res > _Res std::future< _Res >::get () [inline]
Retrieving the value. the one you're probably here for, lowkey. π
References std::move().
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. iconic autogenerated behavior, honestly. π
xoxo, libstdc++ π this page's footer says libstdc++ and std::future< _Res >(3cxx), so that's the source/version plus the manual name, and there's no separate date printed. mwah π
π¦ 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