synth-three-way, synth-three-way-result
From cppreference.com
| constexpr auto synth-three-way = /* 以下を参照 */; |
(1) | (C++20以降) (説明用*) |
| template< class T, class U = T > using synth-three-way-result = |
(2) | (C++20以降) (説明用*) |
1) 合成された三方比較関数として動作する operator() を持つ関数オブジェクト。以下と同等です。
constexpr auto synth-three-way = []<class T, class U>(const T& t, const U& u) requires requires { { t < u } -> boolean-testable; { u < t } -> boolean-testable; } { if constexpr (std::three_way_comparable_with<T, U>) return t <=> u; else { if (t < u) return std::weak_ordering::less; if (u < t) return std::weak_ordering::greater; return std::weak_ordering::equivalent; } };
2) (1) (
synth-three-way) の operator() の戻り値の型。[編集] パラメーター
| t, u | - | 比較される値 |
[編集] 戻り値
比較結果。
[編集] 関連項目
| (C++20で削除)(C++20で削除)(C++20で削除)(C++20で削除)(C++20で削除)(C++20) |
pair内の値を辞書式比較する(関数テンプレート) |
| (C++20で削除)(C++20で削除)(C++20で削除)(C++20で削除)(C++20で削除)(C++20) |
タプル内の値を辞書順に比較する (関数テンプレート) |
| (C++11)(C++11)(C++20で削除)(C++11)(C++20で削除)(C++11)(C++20で削除)(C++11)(C++20で削除)(C++11)(C++20で削除)(C++20) |
2つの array の値を辞書式順序で比較する(関数テンプレート) |
| (C++20で削除)(C++20で削除)(C++20で削除)(C++20で削除)(C++20で削除)(C++20) |
2つの deque の値を辞書式順序で比較する(関数テンプレート) |
| (C++11)(C++11)(C++20で削除)(C++11)(C++20で削除)(C++11)(C++20で削除)(C++11)(C++20で削除)(C++11)(C++20で削除)(C++20) |
2つのforward_listの値を辞書順で比較する(関数テンプレート) |
| (C++20で削除)(C++20で削除)(C++20で削除)(C++20で削除)(C++20で削除)(C++20) |
2つの list の値を辞書式比較する(関数テンプレート) |
| (C++20で削除)(C++20で削除)(C++20で削除)(C++20で削除)(C++20で削除)(C++20) |
2つのvectorの値を辞書式順序で比較する(関数テンプレート) |
| (C++20で削除)(C++20で削除)(C++20で削除)(C++20で削除)(C++20で削除)(C++20) |
2つのmapの値を辞書式比較する(関数テンプレート) |
| (C++20で削除)(C++20で削除)(C++20で削除)(C++20で削除)(C++20で削除)(C++20) |
2つの multimap の値を辞書式比較する(関数テンプレート) |
| (C++20で削除)(C++20で削除)(C++20で削除)(C++20で削除)(C++20で削除)(C++20) |
2つのsetの値を辞書順で比較する(関数テンプレート) |
| (C++20で削除)(C++20で削除)(C++20で削除)(C++20で削除)(C++20で削除)(C++20) |
2つのmultisetの値を辞書式比較する(関数テンプレート) |