命名空间
变体
操作

std::experimental::ranges::StrictWeakOrder

来自 cppreference.cn
< cpp‎ | experimental‎ | ranges
 
 
实验性
技术规范
文件系统库 (filesystem TS)
库基础 (library fundamentals TS)
库基础 2 (library fundamentals TS v2)
库基础 3 (library fundamentals TS v3)
并行性扩展 (parallelism TS)
并行性扩展 2 (parallelism TS v2)
并发性扩展 (concurrency TS)
并发性扩展 2 (concurrency TS v2)
概念 (concepts TS)
范围 (ranges TS)
反射 (reflection TS)
数学特殊函数 (special functions TR)
实验性 非TS
模式匹配
线性代数
std::execution
契约
2D 图形
 
 
概念库
核心语言概念
                              
对象概念
                              
                              
比较概念
可调用概念
                                        
                              
严格弱序

URNG 概念
 
template< class R, class T, class U >
concept bool StrictWeakOrder = Relation<R, T, U>;
(1) (ranges TS)

概念 StrictWeakOrder<R, T, U> 规定 Relation R 对其参数施加严格弱序。关系 r 是严格弱序,如果

  • 它是非自反的:对于所有 xr(x, x) 为假;
  • 它是传递的:对于所有 abc,如果 r(a, b)r(b, c) 都为真,则 r(a, c) 为真;
  • e(a, b)!r(a, b) && !r(b, a),则 e 是传递的:e(a, b) && e(b, c) 蕴含 e(a, c)

在这些条件下,可以证明 e 是一个等价关系,且 r 在由 e 确定的等价类上诱导一个严格全序。

[编辑] 注释

RelationStrictWeakOrder 之间的区别纯粹是语义上的。