__GNU_CXX::CONSTANT_UNARY_FUN(3cxx)

🌸 NAME 🌸

okay so this page is all about __gnu_cxx::constant_unary_fun< _Result, _Argument > β€” and yes bestie, it’s an SGI extension. It lives in the 3cxx manual, and we’re gonna get into it πŸ’…


✨ SYNOPSIS ✨

#include <functional>

It inherits __gnu_cxx::_Constant_unary_fun< _Result, _Argument >.

πŸŽ€ Public Types πŸŽ€

  • argument_type β€” typedef _Argument argument_type
  • result_type β€” typedef _Result result_type

🫢 Public Member Functions 🫢

  • constant_unary_fun (const _Result &__v) β€” the constructor, taking const _Result &__v
  • const result_type & operator() (const _Argument &) const β€” the call operator, returning const result_type &, taking const _Argument &, and it’s const

πŸ¦‹ Public Attributes πŸ¦‹

  • result_type _M_val β€” a public attribute, just sitting there being iconic

πŸ’– Detailed Description πŸ’–

Under the hood it’s declared like this:

template<class _Result, class _Argument = _Result>
    struct __gnu_cxx::constant_unary_fun< _Result, _Argument >

And the entire detailed description is literally "An SGI extension . β€” yes, with the stray quote and the space before the period. We keep the lore 🫑✨


πŸ‘‘ Author πŸ‘‘

Bestie, nobody hand-wrote this one: Generated automatically by Doxygen for libstdc++ from the source code.


Cute little sign-off: this page is from the libstdc++ docs, generated straight from the source code, and it’s chillin’ in the 3cxx manual β€” no date printed on the footer, so this page has no birthday πŸŽ‚πŸ˜­. Stay hydrated and #include <functional> responsibly, bestie πŸ’œπŸŒˆβœ¨