__gnu_parallel::plus(3)

πŸ“¦ version 4.4.0, in nixpkgs unstable

okay so bestie, welcome to the __gnu_parallel::plus(3) page β€” yes, the one from the Library Functions Manual. Buckle up, because this is a tiny struct with big β€œwhy is this typedef like that” energy. πŸ’…

🌸 NAME 🌸

__gnu_parallel::plus β€” it’s similar to std::plus, but it allows two different types. No cap, that’s the whole point. 🫢

✨ SYNOPSIS ✨

It inherits from binary_function< _Tp1, _Tp2, _Tp1 >.

πŸŽ€ Public Types πŸŽ€

  • typedef _Tp1 first_argument_type
  • typedef _Tp1 result_type
  • typedef _Tp2 second_argument_type
  • and then there’s this absolute masterpiece of a result typedef, copied exactly because we do not touch the chaos:
       typedef __typeof__(*)(const _Tp1 &__x, const _Tp2 &__y static_cast
           )(NULL)+*static_cast< _Tp2 * >(NULL)) result;resultoperator(

πŸ’… Detailed Description πŸ’…

Here’s the template, copied exactly because we do not mess with the source:

   template<typename _Tp1, typename _Tp2> struct __gnu_parallel::plus< _Tp1,
       _Tp2 >

Similar to std::plus, but allows two different types. That’s the vibe. Definition at line 281 of file base.h.

πŸ¦‹ Member Typedef Documentation πŸ¦‹

first_argument_type [inherited] β€” the type of the first argument (no surprises here, bestie).

   typedef _Tp1  std::binary_function< _Tp1 , _Tp2 , _Tp1
       >::first_argument_type [inherited]

Definition at line 114 of file stl_function.h.


result_type [inherited] β€” type of the return type. Lowkey iconic.

   typedef _Tp1  std::binary_function< _Tp1 , _Tp2 , _Tp1
       >::result_type [inherited]

Definition at line 118 of file stl_function.h.


second_argument_type [inherited] β€” the type of the second argument. Periodt.

   typedef _Tp2  std::binary_function< _Tp1 , _Tp2 , _Tp1
       >::second_argument_type [inherited]

Definition at line 117 of file stl_function.h.

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. So yeah, this page was built by the robots, not a human with a group chat. πŸ’€

xoxo, libstdc++ Β· 21 Apr 2009 Β· __gnu_parallel::plus(3) πŸ’–

πŸ“¦ where this page comes from