---
name: "std::rel_ops"
section: "3"
platform: "linux"
package: "gcc"
version: "16.2.1+r23+gd564253eb6c8-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/std::rel_ops"
---

# std::rel\_ops(3)

The generated relational operators are sequestered here.

## NAME

std::rel\_ops - The generated relational operators are sequestered here.

## SYNOPSIS

### 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.

## Author

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