std::rel_ops(3cxx)

okay so you're on the std::rel_ops(3cxx) page from libstdc++, and we're gonna get into it, bestie. πŸ’…

πŸŽ€ NAME πŸŽ€

std::rel_ops β€” The generated relational operators are sequestered here. No cap. 🫢


✨ SYNOPSIS ✨

🧚 Functions 🧚

template<class _Tp > bool operator!= (const _Tp &__x, const _Tp &__y)
template<class _Tp > bool operator<= (const _Tp &__x, const _Tp &__y)
template<class _Tp > bool operator> (const _Tp &__x, const _Tp &__y)
template<class _Tp > bool operator>= (const _Tp &__x, const _Tp &__y)
  • operator!= β€” Defines != for arbitrary types, in terms of ==.
  • operator<= β€” Defines <= for arbitrary types, in terms of <.
  • operator> β€” Defines > for arbitrary types, in terms of <.
  • operator>= β€” Defines >= for arbitrary types, in terms of <.

πŸ¦‹ Detailed Description πŸ¦‹

The generated relational operators are sequestered here. 🌸

Libstdc++ headers must not use the contents of rel_ops. User code should also avoid them, because unconstrained function templates are too greedy and can easily cause ambiguities. Like, they will absolutely start drama. 😭

C++20 default comparisons are a better solution. periodt. ⭐


πŸ’– Function Documentation πŸ’–

πŸ’œ template<class _Tp > bool std::rel_ops::operator!= (const _Tp & __x, const _Tp & __y) [inline] πŸ’œ

Defines != for arbitrary types, in terms of ==.

Parameters

  • __x β€” A thing.
  • __y β€” Another thing.

Returns __x != __y

This function uses == to determine its result. πŸŽ€


πŸ’œ template<class _Tp > bool std::rel_ops::operator<= (const _Tp & __x, const _Tp & __y) [inline] πŸ’œ

Defines <= for arbitrary types, in terms of <.

Parameters

  • __x β€” A thing.
  • __y β€” Another thing.

Returns __x <= __y

This function uses < to determine its result. πŸ¦‹


πŸ’œ template<class _Tp > bool std::rel_ops::operator> (const _Tp & __x, const _Tp & __y) [inline] πŸ’œ

Defines > for arbitrary types, in terms of <.

Parameters

  • __x β€” A thing.
  • __y β€” Another thing.

Returns __x > __y

This function uses < to determine its result. 🌈


πŸ’œ template<class _Tp > bool std::rel_ops::operator>= (const _Tp & __x, const _Tp & __y) [inline] πŸ’œ

Defines >= for arbitrary types, in terms of <.

Parameters

  • __x β€” A thing.
  • __y β€” Another thing.

Returns __x >= __y

This function uses < to determine its result. ⭐


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. πŸ€–

xoxo, your Unix bestie πŸ’– β€” footer tea: source/version is libstdc++ / std::rel_ops(3cxx), and the date isn't printed on this page, so I'm not inventing one. 🫢

πŸ“¦ where this page comes from