std::__future_base(3cxx)

πŸ’– std::__future_base β€” the manual page, but make it a group chat πŸ’–

okay bestie, buckle up, we're reading the std::__future_base(3cxx) page together and it's giving backstage pass to the future machinery. This is a page from the libstdc++ manual (that's the GNU C++ standard library, section 3cxx, iykyk) and it's literally just the base class and enclosing scope. Very "I'm the parent, everything else lives inside me" energy. πŸ‘‘


✨ NAME ✨

std::__future_base β€” base class and enclosing scope. that's it, that's the whole name section. short queen behavior. πŸ’…


🌸 SYNOPSIS 🌸

Inherited by std::__basic_future< void >, std::__basic_future< _Res & >, and std::__basic_future< _Res >.

so like, these three are the children and they all inherited from her. she's the mom of the future family. iconic lineage fr fr. 🫢

πŸŽ€ Classes πŸŽ€

okay so she's got a whole little squad of nested classes living inside her, and each one has a job:

  • struct _Result β€” a result object that has storage for an object of type _Res. she holds your stuff. that's her whole thing.
  • struct _Result< _Res & > β€” the partial specialization for reference types. not me giving the references their own dedicated version 😭
  • struct _Result< void > β€” the explicit specialization for void. yes bestie, even void gets one. no one is left out in this household. πŸ’œ
  • struct _Result_alloc β€” a result object that uses an allocator. fancy girl with a memory budget.
  • struct _Result_base β€” the base class for results. the OG, the blueprint, the blueprint of the blueprints.

πŸ’« Public Types πŸ’«

  • template<typename _Res > using _Ptr = unique_ptr< _Res, _Result_base::_Deleter > β€” a unique_ptr for result objects. one owner, no sharing, no drama. ✨
  • using _State_base = _State_baseV2 β€” it's just an alias to _State_baseV2. that's the whole tea. lowercase slay.

πŸ”₯ Static Public Member Functions πŸ”₯

static girls don't need an instance, they just are. periodt.

  • template<typename _Res , typename _Allocator > static _Ptr< _Result_alloc< _Res, _Allocator > > _S_allocate_result (const _Allocator &__a) β€” allocates a result, using the allocator you hand her.
  • template<typename _Res , typename _Tp > static _Ptr< _Result< _Res > > _S_allocate_result (const std::allocator< _Tp > &__a) β€” same name, different flavor, this one's the std::allocator< _Tp > version.
  • template<typename _Res_ptr , typename _BoundFn > static _Task_setter< _Res_ptr, _BoundFn > _S_task_setter (_Res_ptr &__ptr, _BoundFn &__call) β€” builds you a _Task_setter out of a pointer and a callable. setting up the task, bestie. πŸ’–

🌈 Detailed Description 🌈

Base class and enclosing scope. (yes, the description is the same as the name. she's consistent. she knows who she is. main character energy.)

Definition at line 198 of file future.


πŸ¦‹ Member Typedef Documentation πŸ¦‹

  • template<typename _Res > using std::__future_base::_Ptr = unique_ptr<_Res, _Result_base::_Deleter> β€” a unique_ptr for result objects. (yes, again. she's telling you twice so you remember it. πŸ’€)

Definition at line 223 of file future.


πŸ‘‘ Author πŸ‘‘

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


lowkey reminder bestie: this whole page is auto-generated docs for an internal base class. if you're poking at it directly, vibe check your design first. πŸ™ˆ

and that's a wrap, my love. this page came from the libstdc++ manual, dated Sat Mar 19 2022, and the footer just says std::__future_base(3cxx) like a little signature at the bottom of the letter. mwah. πŸ’…πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from