tmp/tmp12hxg6hn/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### Concept <a id="concept.strictweakorder">[[concept.strictweakorder]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
template<class R, class T, class U>
|
| 5 |
+
concept strict_weak_order = relation<R, T, U>;
|
| 6 |
+
```
|
| 7 |
+
|
| 8 |
+
A `relation` models `strict_weak_order` only if it imposes a *strict
|
| 9 |
+
weak ordering* on its arguments.
|
| 10 |
+
|
| 11 |
+
The term *strict* refers to the requirement of an irreflexive relation
|
| 12 |
+
(`!comp(x, x)` for all `x`), and the term *weak* to requirements that
|
| 13 |
+
are not as strong as those for a total ordering, but stronger than those
|
| 14 |
+
for a partial ordering. If we define `equiv(a, b)` as
|
| 15 |
+
`!comp(a, b) && !comp(b, a)`, then the requirements are that `comp` and
|
| 16 |
+
`equiv` both be transitive relations:
|
| 17 |
+
|
| 18 |
+
- `comp(a, b) && comp(b, c)` implies `comp(a, c)`
|
| 19 |
+
- `equiv(a, b) && equiv(b, c)` implies `equiv(a, c)`
|
| 20 |
+
|
| 21 |
+
[*Note 1*:
|
| 22 |
+
|
| 23 |
+
Under these conditions, it can be shown that
|
| 24 |
+
|
| 25 |
+
- `equiv` is an equivalence relation,
|
| 26 |
+
- `comp` induces a well-defined relation on the equivalence classes
|
| 27 |
+
determined by `equiv`, and
|
| 28 |
+
- the induced relation is a strict total ordering.
|
| 29 |
+
|
| 30 |
+
— *end note*]
|
| 31 |
+
|
| 32 |
+
<!-- Link reference definitions -->
|
| 33 |
+
[basic.compound]: basic.md#basic.compound
|
| 34 |
+
[basic.fundamental]: basic.md#basic.fundamental
|
| 35 |
+
[basic.lookup.argdep]: basic.md#basic.lookup.argdep
|
| 36 |
+
[basic.types]: basic.md#basic.types
|
| 37 |
+
[class.member.lookup]: class.md#class.member.lookup
|
| 38 |
+
[concept.assignable]: #concept.assignable
|
| 39 |
+
[concept.booleantestable]: #concept.booleantestable
|
| 40 |
+
[concept.common]: #concept.common
|
| 41 |
+
[concept.commonref]: #concept.commonref
|
| 42 |
+
[concept.constructible]: #concept.constructible
|
| 43 |
+
[concept.convertible]: #concept.convertible
|
| 44 |
+
[concept.copyconstructible]: #concept.copyconstructible
|
| 45 |
+
[concept.default.init]: #concept.default.init
|
| 46 |
+
[concept.derived]: #concept.derived
|
| 47 |
+
[concept.destructible]: #concept.destructible
|
| 48 |
+
[concept.equalitycomparable]: #concept.equalitycomparable
|
| 49 |
+
[concept.equiv]: #concept.equiv
|
| 50 |
+
[concept.invocable]: #concept.invocable
|
| 51 |
+
[concept.moveconstructible]: #concept.moveconstructible
|
| 52 |
+
[concept.predicate]: #concept.predicate
|
| 53 |
+
[concept.regularinvocable]: #concept.regularinvocable
|
| 54 |
+
[concept.relation]: #concept.relation
|
| 55 |
+
[concept.same]: #concept.same
|
| 56 |
+
[concept.strictweakorder]: #concept.strictweakorder
|
| 57 |
+
[concept.swappable]: #concept.swappable
|
| 58 |
+
[concept.totallyordered]: #concept.totallyordered
|
| 59 |
+
[concepts]: #concepts
|
| 60 |
+
[concepts.arithmetic]: #concepts.arithmetic
|
| 61 |
+
[concepts.callable]: #concepts.callable
|
| 62 |
+
[concepts.callable.general]: #concepts.callable.general
|
| 63 |
+
[concepts.compare]: #concepts.compare
|
| 64 |
+
[concepts.compare.general]: #concepts.compare.general
|
| 65 |
+
[concepts.equality]: #concepts.equality
|
| 66 |
+
[concepts.general]: #concepts.general
|
| 67 |
+
[concepts.lang]: #concepts.lang
|
| 68 |
+
[concepts.lang.general]: #concepts.lang.general
|
| 69 |
+
[concepts.object]: #concepts.object
|
| 70 |
+
[concepts.summary]: #concepts.summary
|
| 71 |
+
[concepts.syn]: #concepts.syn
|
| 72 |
+
[cpp17.destructible]: #cpp17.destructible
|
| 73 |
+
[customization.point.object]: library.md#customization.point.object
|
| 74 |
+
[declval]: utilities.md#declval
|
| 75 |
+
[defns.const.subexpr]: library.md#defns.const.subexpr
|
| 76 |
+
[expr.log.and]: expr.md#expr.log.and
|
| 77 |
+
[expr.log.or]: expr.md#expr.log.or
|
| 78 |
+
[expr.prim.id]: expr.md#expr.prim.id
|
| 79 |
+
[expr.unary.op]: expr.md#expr.unary.op
|
| 80 |
+
[forward]: utilities.md#forward
|
| 81 |
+
[func.def]: utilities.md#func.def
|
| 82 |
+
[func.invoke]: utilities.md#func.invoke
|
| 83 |
+
[function.objects]: utilities.md#function.objects
|
| 84 |
+
[lib.types.movedfrom]: library.md#lib.types.movedfrom
|
| 85 |
+
[meta.trans.other]: utilities.md#meta.trans.other
|
| 86 |
+
[meta.type.synop]: utilities.md#meta.type.synop
|
| 87 |
+
[namespace.memdef]: dcl.md#namespace.memdef
|
| 88 |
+
[over.best.ics]: over.md#over.best.ics
|
| 89 |
+
[structure.requirements]: library.md#structure.requirements
|
| 90 |
+
[temp.deduct.call]: temp.md#temp.deduct.call
|
| 91 |
+
[temp.deduct.type]: temp.md#temp.deduct.type
|
| 92 |
+
[template.bitset]: utilities.md#template.bitset
|
| 93 |
+
|
| 94 |
+
[^1]: The name `swap` is used here unqualified.
|