Files
2025-10-25 03:02:53 +03:00

50 lines
1.3 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[comparisons.greater]
# 22 General utilities library [[utilities]](./#utilities)
## 22.10 Function objects [[function.objects]](function.objects#comparisons.greater)
### 22.10.8 Comparisons [[comparisons]](comparisons#greater)
#### 22.10.8.4 Class template greater [comparisons.greater]
[🔗](#lib:greater)
`template<class T = void> struct greater {
constexpr bool operator()(const T& x, const T& y) const;
};
`
[🔗](#lib:operator(),greater)
`constexpr bool operator()(const T& x, const T& y) const;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L12380)
*Returns*: x > y[.](#1.sentence-1)
[🔗](#lib:greater%3c%3e)
`template<> struct greater<void> {
template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) > std::forward<U>(u));
using is_transparent = unspecified;
};
`
[🔗](#lib:operator(),greater%3c%3e)
`template<class T, class U> constexpr auto operator()(T&& t, U&& u) const
-> decltype(std::forward<T>(t) > std::forward<U>(u));
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L12402)
*Returns*: std::forward<T>(t) > std::forward<U>(u)[.](#2.sentence-1)