STD::UNARY_FUNCTION(3cxx)

πŸ’œ std::unary_function< _Arg, _Result > β€” NAME

okay so bestie, welcome to the std::unary_function< _Arg, _Result > page from the (3cxx) manual β€” yes the header got a little chopped in the terminal, it's giving "my name is a mystery" but we move πŸ’…

This is the manpage for std::unary_function, a lil template struct in libstdc++ land. Buckle up, it's short but it's iconic. ✨


🌸 SYNOPSIS

#include <functional>

That's the whole vibe check for the include, bestie. One header, no notes. πŸŽ€

Inherited by std::_Identity< _Value >, std::_Select1st< pair< const _Key, _Tp > >, and std::pointer_to_unary_function< _Arg, _Result >. Like, this struct is the main character that other structs inherit from β€” very mother energy. πŸ‘‘

πŸ’– Public Types

  • typedef _Arg argument_type β€” argument_type is the type of the argument 🫢
  • typedef _Result result_type β€” result_type is the return type 🫢

Two typedefs, both slaying, both doing exactly what they say on the tin. No cap.


πŸ”₯ Detailed Description

template<typename _Arg, typename _Result>
    struct std::unary_function< _Arg, _Result >

It's the "Helper for defining adaptable unary function objects." πŸ’« That's the official tagline and honestly? Ate.

⚠️ Deprecated β€” bestie listen to me. Deprecated in C++11, no longer in the standard since C++17. So yeah, this one is lowkey retired from the standard. Still here in libstdc++, still doing its thing, but like… know what you're getting into. 😭

πŸ¦‹ Member Typedef Documentation

🌈 argument_type

template<typename _Arg , typename _Result > typedef _Arg
    std::unary_function< _Arg , _Result >::argument_type

argument_type is the type of the argument πŸ’œ β€” literally the type you pass in, no guessing, no detective work required.

⭐ result_type

template<typename _Arg , typename _Result > typedef _Result
    std::unary_function< _Arg , _Result >::result_type

result_type is the return type πŸ’œ β€” the type that comes back out. In and out, that's the whole relationship fr fr. 🧚


πŸŽ€ Author

Generated automatically by Doxygen for libstdc++ from the source code. So like, no human wrote this by hand β€” the robot did it and honestly? Slay, Doxygen. πŸ€–βœ¨


and that's the page!! 🌸 This one is from the libstdc++ docs, and yeah, the footer's that same std::unary_func..._Arg, _Result >(3cxx) string with the version + date all smooshed together β€” so consider this your cute little sign-off: libstdc++ / (3cxx), dated whenever that footer said it was, mwah πŸ’‹ πŸ¦‹

πŸ“¦ where this page comes from