From Jason Turner

[alg.heap.operations]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp2e7xlacd/{from.md → to.md} +12 -8
tmp/tmp2e7xlacd/{from.md → to.md} RENAMED
@@ -1,7 +1,9 @@
1
  ### Heap operations <a id="alg.heap.operations">[[alg.heap.operations]]</a>
2
 
 
 
3
  A random access range \[`a`, `b`) is a *heap with respect to `comp` and
4
  `proj`* for a comparator and projection `comp` and `proj` if its
5
  elements are organized such that:
6
 
7
  - With `N = b - a`, for all i, 0 < i < N,
@@ -38,14 +40,15 @@ template<random_access_range R, class Comp = ranges::less, class Proj = identity
38
 
39
  Let `comp` be `less{}` and `proj` be `identity{}` for the overloads with
40
  no parameters by those names.
41
 
42
  *Preconditions:* The range \[`first`, `last - 1`) is a valid heap with
43
- respect to `comp` and `proj`. For the overloads in namespace `std`, the
44
- type of `*first` meets the *Cpp17MoveConstructible* requirements
45
- ([[cpp17.moveconstructible]]) and the *Cpp17MoveAssignable*
46
- requirements ([[cpp17.moveassignable]]).
 
47
 
48
  *Effects:* Places the value in the location `last - 1` into the
49
  resulting heap \[`first`, `last`).
50
 
51
  *Returns:* `last` for the overloads in namespace `ranges`.
@@ -115,14 +118,15 @@ template<random_access_range R, class Comp = ranges::less, class Proj = identity
115
  ```
116
 
117
  Let `comp` be `less{}` and `proj` be `identity{}` for the overloads with
118
  no parameters by those names.
119
 
120
- *Preconditions:* For the overloads in namespace `std`, the type of
121
- `*first` meets the *Cpp17MoveConstructible*
122
- ([[cpp17.moveconstructible]]) and *Cpp17MoveAssignable*
123
- ([[cpp17.moveassignable]]) requirements.
 
124
 
125
  *Effects:* Constructs a heap with respect to `comp` and `proj` out of
126
  the range \[`first`, `last`).
127
 
128
  *Returns:* `last` for the overloads in namespace `ranges`.
 
1
  ### Heap operations <a id="alg.heap.operations">[[alg.heap.operations]]</a>
2
 
3
+ #### General <a id="alg.heap.operations.general">[[alg.heap.operations.general]]</a>
4
+
5
  A random access range \[`a`, `b`) is a *heap with respect to `comp` and
6
  `proj`* for a comparator and projection `comp` and `proj` if its
7
  elements are organized such that:
8
 
9
  - With `N = b - a`, for all i, 0 < i < N,
 
40
 
41
  Let `comp` be `less{}` and `proj` be `identity{}` for the overloads with
42
  no parameters by those names.
43
 
44
  *Preconditions:* The range \[`first`, `last - 1`) is a valid heap with
45
+ respect to `comp` and `proj`. For the overloads in namespace `std`,
46
+ `RandomAccessIterator` meets the *Cpp17ValueSwappable*
47
+ requirements [[swappable.requirements]] and the type of `*first` meets
48
+ the *Cpp17MoveConstructible* requirements ([[cpp17.moveconstructible]])
49
+ and the *Cpp17MoveAssignable* requirements ([[cpp17.moveassignable]]).
50
 
51
  *Effects:* Places the value in the location `last - 1` into the
52
  resulting heap \[`first`, `last`).
53
 
54
  *Returns:* `last` for the overloads in namespace `ranges`.
 
118
  ```
119
 
120
  Let `comp` be `less{}` and `proj` be `identity{}` for the overloads with
121
  no parameters by those names.
122
 
123
+ *Preconditions:* For the overloads in namespace `std`,
124
+ `RandomAccessIterator` meets the *Cpp17ValueSwappable*
125
+ requirements [[swappable.requirements]] and the type of `*first` meets
126
+ the *Cpp17MoveConstructible* ([[cpp17.moveconstructible]]) and
127
+ *Cpp17MoveAssignable* ([[cpp17.moveassignable]]) requirements.
128
 
129
  *Effects:* Constructs a heap with respect to `comp` and `proj` out of
130
  the range \[`first`, `last`).
131
 
132
  *Returns:* `last` for the overloads in namespace `ranges`.