std::__future_base(3)

πŸ“¦
version 12.2.1 Β· 2 versions
, in centos-stream 9

πŸ’… std::__future_base(3)

okay so bestie, welcome to the std::__future_base page β€” this is the Library Functions Manual entry for it, and honestly? it's the backstage pass of the <future> header. it's the base class and the enclosing scope, which is a whole vibe (main character energy fr fr β€” everything else lives inside it πŸ’–).


✨ NAME ✨

std::__future_base β€” base class and enclosing scope. that's it, that's the name. short, sweet, iconic. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

so this one gets inherited, meaning these girls are its daughters:

  • std::__basic_future< void >
  • std::__basic_future< _Res & >
  • std::__basic_future< _Res >

🌸 Classes

  • struct _Result β€” a result object that has storage for an object of type _Res. it's literally holding your stuff for you. 🫢
  • struct _Result< _Res & > β€” partial specialization for reference types. yes, references get their own little branch of the family tree.
  • struct _Result< void > β€” explicit specialization for void. the "no thing" gets a special case, and honestly? iconic behavior. πŸ’€
  • struct _Result_alloc β€” a result object that uses an allocator.
  • struct _Result_base β€” base class for results. the mother of results, if you will. πŸ‘‘

πŸŽ€ Public Types

  • template<typename _Res > using _Ptr = unique_ptr< _Res, _Result_base::_Deleter > β€” a unique_ptr for result objects. that's the whole job, and it does it slay. ✨
  • using _State_base = _State_baseV2 β€” an alias, no cap. she's just _State_baseV2 with a cuter name.

🧚 Static Public Member Functions

okay bestie, three of these, all starting with _S_, all static, all doing their little thing:

  • template<typename _Res , typename _Allocator > static _Ptr< _Result_alloc< _Res, _Allocator > > _S_allocate_result (const _Allocator &__a)
  • template<typename _Res , typename _Tp > static _Ptr< _Result< _Res > > _S_allocate_result (const std::allocator< _Tp > &__a)
  • template<typename _Res_ptr , typename _BoundFn > static _Task_setter< _Res_ptr, _BoundFn > _S_task_setter (_Res_ptr &__ptr, _BoundFn &__call)

that's two _S_allocate_result overloads (one taking a general _Allocator, one taking std::allocator< _Tp >) and one _S_task_setter. all three are static public member functions, so they're the community-facing girlies of this class. 🌈


πŸ’œ Detailed Description πŸ’œ

Base class and enclosing scope.

that's the whole description. she's the base, she's the scope, she contains multitudes. ✨

Definition at line 198 of file future. β€” yes, literally line 198, go look, i'll wait. πŸ•΅οΈβ€β™€οΈ


πŸ”₯ Member Typedef Documentation πŸ”₯

⭐ template<typename _Res > using std::__future_base::_Ptr = unique_ptr<_Res, _Result_base::_Deleter>

a unique_ptr for result objects. πŸ’… that's the typedef, that's the vibe.

Definition at line 223 of file future. β€” line 223 this time, bestie, not 198. keep track. πŸ“Œ


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. so nobody wrote this, a robot did, and honestly she ate. πŸ€–βœ¨


aaaand that's the page! πŸŽ€ sign-off time: this gem came from libstdc++ and the dated footer says Thu Jul 11 2024, so that's the version + date energy we're closing with. mwah, go read your <future> header, ily, bye! πŸ’–πŸ¦‹πŸ’…

πŸ“¦ where this page comes from