STD::INOUT_PTR_T(3cxx)

πŸ“¦ version 16.2.0, in ubuntu stonking

πŸŽ€ 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... __args pack. 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's const, it's noexcept, it's doing the absolute most while staying completely unbothered 🫢
  • operator void ** () const noexcept β€” and she ALSO converts to void **. also const, also noexcept. 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