std::experimental::ranges::Relation
來自 cppreference.com
< cpp | experimental | ranges
| 定義於標頭檔案 <experimental/ranges/concepts> |
||
| template< class R, class T, class U > concept bool Relation = |
(1) | (ranges TS) |
概念 Relation<R, T, U> 指定 R 定義了在其型別和值類別由 T 或 U 編碼的表示式集合上的二元關係。
給定
-
r是一個表示式,其 decltype((r)) 為R, -
t是一個表示式,其 decltype((t)) 為T, -
u是一個表示式,其 decltype((u)) 為U,
並且令 C 為 ranges::common_reference_t<const std::remove_reference_t<T>&, const std::remove_reference_t<U>&>,
則 Relation<R, T, U> 僅在以下條件滿足時成立:
- bool(r(t, u)) == bool(r(C(t), C(u))) 和
- bool(r(u, t)) == bool(r(C(u), C(t))).