MEMORY_ADAPTORS(3)
okay bestie, this is Adaptors f...to members(3) from the Library Functions Manual β yes, the title really has that f...to shorthand, and we are keeping it exactly. π
π NAME π
okay so this page is literally about Adaptors for pointers to members β the manual-name situation is Adaptors f...to members(3), and the manual is Library Functions Manual. We are so back in template land. β¨
πΈ Classes πΈ
Hereβs the full class lineup, all 8 of them, and every single one is described as one of the adaptors for member pointers. Copy that energy exactly:
class std::const_mem_fun1_ref_t< _Ret, _Tp, _Arg >β One of the adaptors for member pointers. πclass std::const_mem_fun1_t< _Ret, _Tp, _Arg >β One of the adaptors for member pointers. πclass std::const_mem_fun_ref_t< _Ret, _Tp >β One of the adaptors for member pointers. πclass std::const_mem_fun_t< _Ret, _Tp >β One of the adaptors for member pointers. πclass std::mem_fun1_ref_t< _Ret, _Tp, _Arg >β One of the adaptors for member pointers. πclass std::mem_fun1_t< _Ret, _Tp, _Arg >β One of the adaptors for member pointers. πclass std::mem_fun_ref_t< _Ret, _Tp >β One of the adaptors for member pointers. πclass std::mem_fun_t< _Ret, _Tp >β One of the adaptors for member pointers. π
π¦ Functions π¦
and these are the function templates, bestie β every signature below is copied exactly:
template<typename _Ret , typename _Tp , typename _Arg > mem_fun1_t< _Ret, _Tp, _Arg > std::mem_fun (_Ret(_Tp::*__f)(_Arg))template<typename _Ret , typename _Tp > mem_fun_t< _Ret, _Tp > std::mem_fun (_Ret(_Tp::*__f)())template<typename _Ret , typename _Tp , typename _Arg > mem_fun1_ref_t< _Ret, _Tp, _Arg > std::mem_fun_ref (_Ret(_Tp::*__f)(_Arg))template<typename _Ret , typename _Tp > mem_fun_ref_t< _Ret, _Tp > std::mem_fun_ref (_Ret(_Tp::*__f)())
π₯ Detailed Description π₯
okay so there are a total of 8 = 2^3 function objects in this family. The whole vibe check breaks down like this:
(1)Member functions taking no arguments vs member functions taking one argument.(2)Call through pointer vs call through reference.(3)Const vs non-const member function.
All of this complexity is in the function objects themselves. You can ignore it by using the helper function mem_fun and mem_fun_ref, which create whichever type of adaptor is appropriate. Slay β the helpers do the choosing. π«Ά
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. Not a human, just Doxygen doing its thing π.
xoxo, libstdc++ β dated 21 Apr 2009 β Adaptors f...to members(3) out. ππ
π¦ where this page comes from
- nixpkgs unstable: std-man-pages 4.4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms