STD::INOUT_PTR_T(3cxx)
π std::inout_ptr_t< _Smart, _Pointer, _Args > π
hiii bestie!! welcome to the 3cxx manual β that's the libstdc++ corner of your friendly neighbourhood unix man pages β and today's main character is std::inout_ptr_t< _Smart, _Pointer, _Args >, aka the smart pointer adaptor for functions taking an inout pointer parameter. she's giving template class, she's giving C++23, she's giving "why does this convert to a void **", and I am obsessed π
β¨ NAME β¨
std::inout_ptr_t< _Smart, _Pointer, _Args > β Smart pointer adaptor for functions taking an inout pointer parameter. that's the whole job description, no cap π
πΈ SYNOPSIS πΈ
#include <>>>
π«Ά Public Member Functions π«Ά
every single one of these is literally in the source, so let's give them their moment to shine:
inout_ptr_t (_Smart &__smart, _Args... __args)β the constructor, girlie. she takes a_Smart &__smart(a reference to your smart pointer β hence the&, note it) plus the_Args... __argspack. that's what she's built out of β¨inout_ptr_t (const inout_ptr_t &)=deleteβ the copy constructor is=delete. translation: copy-constructing one of these is not allowed, the compiler will simply refuse you, and honestly? she said don't perceive me πoperator _Pointer * () const noexceptβ the conversion operator that hands you a_Pointer *. it'sconst, it'snoexcept, it's doing the absolute most while staying completely unbothered π«Άoperator void ** () const noexceptβ and she ALSO converts tovoid **. alsoconst, alsonoexcept. two whole conversion operators?? main character energy fr fr π
π¦ Detailed Description π¦
here's the class declaration, copied exactly because we respect the source in this house:
template<typename _Smart, typename _Pointer, typename... _Args>
class std::inout_ptr_t< _Smart, _Pointer, _Args >
and the official description is literally: "Smart pointer adaptor for functions taking an inout pointer parameter." that's it, that's the vibe check, it passed π¦
π Template Parameters π
_Smartβ The type of pointer to adapt. (she's the smart one, that's why she's named that way π )_Pointerβ The type of pointer to convert to._Args...β Argument types used when resetting the smart pointer. (yes plural, it's a pack bestie, pack it up)
β Since β
C++23. only the freshest standard for this girlie π
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. not a human, not a girlie, just a doc generator doing her little robot walk β and honestly? she ate π€β¨
okay and that's the whole page, thank you for coming to my TED talk!! cute little sign-off before you go: this beauty ships with libstdc++ (generated automatically by Doxygen from the source code, per the author line), and she lives her best life in manual section 3cxx β so that footer you'd normally scroll right past is just libstd plus the page name plus (3cxx), and there's no big dramatic date stamp for me to spill, sowwy π«Ά anyway go forth and pass those inout pointers, mwah ππβ
π¦ where this page comes from
- ubuntu stonking: libstdc++-16-doc 16.2.0-3ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms