std::rel_ops(3cxx)

std::rel_ops3cxx

The generated relational operators are sequestered here.

Usage

Functions

template<class _Tp > bool operator!= (const _Tp &__x, const _Tp &__y)
Defines != for arbitrary types, in terms of ==. template<class _Tp > bool operator<= (const _Tp &__x, const _Tp &__y)
Defines <= for arbitrary types, in terms of <. template<class _Tp > bool operator> (const _Tp &__x, const _Tp &__y)
Defines > for arbitrary types, in terms of <. template<class _Tp > bool operator>= (const _Tp &__x, const _Tp &__y)
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.

C++20 default comparisons are a better solution.

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.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 7 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12
  8. 13

Author

Generated automatically by Doxygen for libstdc++ from the source code.

From libstdc++-12-doc 12.4.0-5 in Debian 13 (Trixie). Also shipped by libstdc++-13-doc, libstdc++-14-doc. Parsed by carta from the page's man source.