__GNU_PARALLEL::__BINDER2ND(3cxx)

🌸 NAME 🌸

__gnu_parallel::__binder2nd< _Operation, _FirstArgumentType, _SecondArgumentType, _ResultType > β€” bestie, it's basically std::binder2nd's spiritually identical twin, except this one makes you spell out the argument types yourself instead of making the compiler do the detective work. No cap. πŸ’…

Okay so real talk, this is from the libstdc++ manual, section 3cxx β€” that's the C++ library docs, not some random sysadmin thing, iykyk.


✨ SYNOPSIS ✨

#include <base.h>

It inherits from std::unary_function< _FirstArgumentType, _ResultType > β€” so it's a unary function, periodt. 🫢

πŸŽ€ Public Types

  • typedef _FirstArgumentType argument_type β€” the type of the argument. That's it. That's the whole vibe check.
  • typedef _ResultType result_type β€” the return type, aka what you get back after the glow-up. ⭐

πŸ’– Public Member Functions

  • __binder2nd (const _Operation &__x, const _SecondArgumentType &__y) β€” the constructor, takes your operation __x and your frozen second argument __y.
  • _ResultType operator() (_FirstArgumentType &__x) β€” call it with a mutable reference to the first argument. Slay.
  • _ResultType operator() (const _FirstArgumentType &__x) const β€” same energy but const and taking a const reference. Choose your fighter. πŸ”₯

πŸ¦‹ Protected Attributes

  • _Operation _M_op β€” the operation it's holding onto.
  • _SecondArgumentType _M_value β€” the value that gets baked in as the second argument. Iconic.

πŸ‘‘ Detailed Description

template<typename _Operation, typename _FirstArgumentType, typename _SecondArgumentType, typename _ResultType>
class __gnu_parallel::__binder2nd< _Operation, _FirstArgumentType, _SecondArgumentType, _ResultType >

Literally what it says on the tin: "Similar to std::binder2nd, but giving the argument types explicitly." So instead of the library inferring everything, you hand it the types like the responsible main character you are. 🌈


🧚 Member Typedef Documentation

  • typedef _FirstArgumentType std::unary_function< _FirstArgumentType , _ResultType >::argument_type [inherited] β€” inherited, obviously. And yeah: argument_type is the type of the argument.
  • typedef _ResultType std::unary_function< _FirstArgumentType , _ResultType >::result_type [inherited] β€” also inherited, and result_type is the return type. We been knew. πŸ’€

πŸ’œ Author

Generated automatically by Doxygen for libstdc++ from the source code. (Yes bestie, a robot wrote this, not a human, don't @ me πŸ™ˆ)

✨ that's the whole page, mwah πŸ’‹ β€” signed off from the libstdc++ documentation set, generated by Doxygen straight from the source code, no date on this one so don't come for me πŸŽ€