STD::__FUTURE_BASE__RESULT_ALLOC(3cxx)

πŸ’– NAME πŸ’–

std::__future_base::_Result_alloc< _Res, _Alloc > β€” a result object that uses an allocator. bestie it's literally in the name, it's giving "result but make it allocator-flavored" ✨

This one lives in the libstdc++ manual, so you already know it's C++ standard library business πŸ’…


🌸 SYNOPSIS 🌸

template<typename _Res, typename _Alloc>
    struct std::__future_base::_Result_alloc< _Res, _Alloc >;

okay so this thing inherits from both std::__future_base::_Result< _Res > and _Alloc. two parents, one icon, main character energy fr fr 🫢

✨ Public Types ✨

  • using __allocator_type = __alloc_rebind< _Alloc, _Result_alloc > β€” the allocator type, rebound so it plays nice with _Result_alloc. glow-up complete πŸŽ€
  • typedef _Res result_type β€” yeah it just hands you back _Res. no notes. iconic.

πŸ’… Public Member Functions πŸ’…

  • _Result_alloc (const _Alloc &__a) β€” constructor moment, takes the allocator __a. slay.
  • void _M_set (_Res &&__res) β€” set it with an rvalue __res. move it, don't copy it, periodt πŸ”₯
  • void _M_set (const _Res &__res) β€” set it with a const lvalue ref __res. same job, different vibe πŸ’œ
  • _Res & _M_value () noexcept β€” hands you back a _Res &. and it's noexcept, so it will not be throwing hands 😭 literally no exceptions allowed

πŸ¦‹ Public Attributes πŸ¦‹

  • exception_ptr _M_error β€” the error slot. if something went sideways, the tea is stored right here πŸ™ˆ

🌈 Detailed Description 🌈

template<typename _Res, typename _Alloc>
    struct std::__future_base::_Result_alloc< _Res, _Alloc >;

A result object that uses an allocator. that's the whole assignment bestie, and it ate πŸ’–

ngl the source is not mysterious about where this lives:

Definition at line 268 of file future.

yes, file future, line 268, no cap πŸ“Œ


πŸŽ€ Author πŸŽ€

Generated automatically by Doxygen for libstdc++ from the source code. so no human author to stan, the robot did it πŸ€–βœ¨


and that's the whole page bestie, we made it πŸ’œ this lil doc came straight from the libstdc++ manual, dated Sat Mar 1, and it's the std::__future_... _Res, _Alloc >(3cxx) page in all its glory. go forth and allocate 🫢🌸

πŸ“¦ where this page comes from