STD::__FUTURE_BASE__RESULT(3cxx)

🌸 NAME 🌸

std::__future_base::_Result< _Res > β€” bestie, it's a result object, and it comes with storage for an object of type _Res. That's the whole vibe. πŸ’–


✨ SYNOPSIS ✨

Okay so the family tree real quick, because this struct did NOT come from nowhere:

Inherits std::__future_base::_Result_base.

And it's got a glow-up descendant of its own:

Inherited by std::__future_base::_Result_alloc< _Res, _Alloc >.

πŸŽ€ Public Types

  • typedef _Res result_type β€” the type it holds, front and center, no secrets. πŸ’…

🫢 Public Member Functions

  • void _M_set (_Res &&__res) β€” drops in a value, move-flavored, rvalue energy only.
  • void _M_set (const _Res &__res) β€” same thing but copy-style, takes a const _Res & and doesn't mess with it.
  • _Res & _M_value () noexcept β€” hands you back a _Res &, and yes it's noexcept, it said what it said. πŸ”₯

⭐ Public Attributes

  • exception_ptr _M_error β€” the little corner where an error can just... live. πŸ™ˆ

πŸ’œ DETAILED DESCRIPTION πŸ’œ

template<typename _Res>
    struct std::__future_base::_Result< _Res >

A result object that has storage for an object of type _Res. That's it, that's the whole assignment, and it ate. πŸ‘‘

Heads up, icon: this is defined at line 227 of file future. Noted. Bookmarked. Immortalized. ✨

πŸ¦‹ AUTHOR πŸ¦‹

Generated automatically by Doxygen for libstdc++ from the source code. Not a human, not a bestie, just a very diligent little tool doing its thing. 🧚


And that's the tea, fr fr β€” this page is from the libstdc++ manual, dated Sat Mar 1, filed under std::__future_..._Result< _Res >(3cxx). Slay, go forth and store your results. πŸ’–πŸŒˆ

πŸ“¦ where this page comes from