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'snoexcept, 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 line268of filefuture.
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
- ubuntu jammy: libstdc++-12-doc 12-20220319-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms