STD::LESS(3cxx)

πŸ’… std::less< _Tp > β€” one of the comparison functors (manual section 3cxx, bestie)

okay so you found the std::less< _Tp > page and you're like "why is this so short" β€” because it's literally just the vibes of "less than" wrapped in a functor, and honestly? iconic. this is a C++ manpage from section 3cxx, and we're gonna walk it together. 🫢


✨ NAME ✨

std::less< _Tp > β€” one of the comparison functors πŸ’–

like, that's it. that's the whole personality. it compares two things and tells you if the first one is less. no cap.


🌸 SYNOPSIS 🌸

#include <functional>

Inherits std::binary_function< _Tp, _Tp, bool >.

Inherited by __gnu_parallel::_Less< _Tp, _Tp >.

so yeah she's a middle child in the inheritance tree β€” she's got a parent and she's got a kid. main character energy honestly πŸ‘‘

πŸŽ€ Public Types πŸŽ€

  • typedef _Tp first_argument_type β€” first_argument_type is the type of the first argument ✨
  • typedef bool result_type β€” result_type is the return type, and yes it's bool, obviously, she's not out here returning vibes πŸ’…
  • typedef _Tp second_argument_type β€” second_argument_type is the type of the second argument πŸ¦‹

πŸ¦‹ Public Member Functions πŸ¦‹

  • constexpr bool operator() (const _Tp &__x, const _Tp &__y) const β€” the whole entire point of her existence, lowkey

πŸ’œ Detailed Description πŸ’œ

template<typename _Tp>
    struct std::less< _Tp >

"One of the comparison functors." β€” that's the official quote, straight from the source, quotation mark and all. short! sweet! to the point! she said what she said πŸ’€


⭐ Member Typedef Documentation ⭐

these three are all marked [inherited] from std::binary_function< _Tp , _Tp , bool > β€” so she got them from her parent, she didn't invent them, but she's still serving πŸŽ€

  • typedef _Tp std::binary_function< _Tp , _Tp , bool >::first_argument_type β€” [inherited] β€” first_argument_type is the type of the first argument
  • typedef bool std::binary_function< _Tp , _Tp , bool >::result_type β€” [inherited] β€” result_type is the return type
  • typedef _Tp std::binary_function< _Tp , _Tp , bool >::second_argument_type β€” [inherited] β€” second_argument_type is the type of the second argument
🧚 friendly reminder that all three say [inherited] β€” if you're trying to find these typedefs inside std::less itself, they're not there, they're up at the std::binary_function level. iykyk

🌈 Author 🌈

Generated automatically by Doxygen for libstdc++ from the source code. so nobody actually wrote this by hand β€” the robots did it β€” and honestly they ate πŸ€–βœ¨


okay bestie that's the whole page, go forth and compare things πŸ’–

β€” with love, your girl, signing off πŸ’…

libstdc++ Β· the std::less< _Tp >(3cxx) page Β· and that's a wrap, periodt πŸŽ€

πŸ“¦ where this page comes from