__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__xand 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 butconstand taking aconstreference. 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 π
π¦ where this page comes from
- debian trixie: libstdc++-12-doc 12.4.0-5
- debian trixie: libstdc++-13-doc 13.3.0-16
- debian trixie: libstdc++-14-doc 14.2.0-19
- ubuntu noble: libstdc++-10-doc 10.5.0-4ubuntu2
- ubuntu noble: libstdc++-10-doc 10.5.0-4ubuntu2.1
- ubuntu noble: libstdc++-11-doc 11.4.0-9ubuntu1
- ubuntu noble: libstdc++-11-doc 11.5.0-1ubuntu1~24.04.1
- ubuntu noble: libstdc++-12-doc 12.3.0-17ubuntu1
- ubuntu noble: libstdc++-12-doc 12.4.0-2ubuntu1~24.04.1
- ubuntu noble: libstdc++-13-doc 13.2.0-23ubuntu4
- ubuntu noble: libstdc++-13-doc 13.3.0-6ubuntu2~24.04.1
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- ubuntu noble: libstdc++-14-doc 14.2.0-4ubuntu2~24.04.1
- ubuntu questing: libstdc++-11-doc 11.5.0-7ubuntu1
- ubuntu questing: libstdc++-11-doc 11.5.0-7ubuntu1.1
- ubuntu questing: libstdc++-12-doc 12.5.0-6ubuntu1
- ubuntu questing: libstdc++-13-doc 13.4.0-4ubuntu1
- ubuntu questing: libstdc++-14-doc 14.3.0-8ubuntu1
- ubuntu questing: libstdc++-15-doc 15.2.0-4ubuntu4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms