__GNU_PARALLEL::_LESS(3cxx)

πŸ’… __gnu_parallel::_Less< _T1, _T2 > ✨

okay so this is a page from the 3cxx manual, bestie β€” it's the docs for a lil struct in libstdc++ called __gnu_parallel::_Less. Let's get into it 🫢

🌸 NAME 🌸

__gnu_parallel::_Less< _T1, _T2 > β€” literally does the same job as std::less, except it's not weird about it and lets your two types be different. iconic behaviour, no cap πŸ’…

✨ SYNOPSIS ✨

#include <base.h>

It inherits from std::binary_function< _T1, _T2, bool >. yes, that's the parent, we love a legacy bloodline πŸ‘‘

πŸŽ€ Public Types πŸŽ€

  • typedef _T1 first_argument_type β€” the type of the first argument, exactly what it says on the tin πŸ“
  • typedef bool result_type β€” the return type. spoiler: it's a bool πŸ’–
  • typedef _T2 second_argument_type β€” the type of the second argument, and yes, it's allowed to be a whole different type from the first one. that's the whole point, iykyk 🌈

πŸ¦‹ Public Member Functions πŸ¦‹

  • bool operator() (const _T1 &__t1, const _T2 &__t2) const β€” call it with a _T1 and then a _T2 🫢
  • bool operator() (const _T2 &__t2, const _T1 &__t1) const β€” or flip the order and call it with a _T2 first and a _T1 second. both directions, we contain multitudes ✨

πŸ’œ Detailed Description πŸ’œ

template<typename _T1, typename _T2>
    struct __gnu_parallel::_Less< _T1, _T2 >
"Similar to std::less, but allows two different types."

that's the quote, that's the vibe. two template params, one comparison, zero drama 🌸

πŸ‘‘ Member Typedef Documentation πŸ‘‘

all three of these are [inherited], so they're coming straight from std::binary_function< _T1 , _T2 , bool > β€” shoutout to the parent struct for the genetics 🧬

  • typedef _T1 std::binary_function< _T1 , _T2 , bool >::first_argument_type [inherited] β€” first_argument_type is the type of the first argument, fr fr πŸ’–
  • typedef bool std::binary_function< _T1 , _T2 , bool >::result_type [inherited] β€” result_type is the return type. it's bool. that's the whole lore πŸŽ€
  • typedef _T2 std::binary_function< _T1 , _T2 , bool >::second_argument_type [inherited] β€” second_argument_type is the type of the second argument, and she can be a totally different type than the first one πŸ¦‹

⭐ Author ⭐

Generated automatically by Doxygen for libstdc++ from the source code. so nobody wrote this by hand, it's a robot's art 🎨😭

okay that's the page!! πŸ’– and for the sign-off β€” this one's from libstdc++, living in the 3cxx manual, and ngl the footer line got chopped mid-word (libst…, truly a moment πŸ’€) so i can't give you a clean date, but it's the __gnu_parallel::_Less< _T1, _T2 >(3cxx) footer through and through. mwah 😘✨