Skip to content

Commit 0a577e5

Browse files
committed
Eliminate requires, complexity, & notes clauses for reduce's special forms.
1 parent b4d91cb commit 0a577e5

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

algorithms.html

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -550,20 +550,24 @@ <h1>Reduce</h1>
550550
</cxx-returns>
551551

552552
<cxx-requires>
553-
<code>typename iterator_traits&lt;InputIterator&gt;::value_type{}</code>
554-
shall be a valid expression. The <code>operator+</code> function associated with
555-
<code>iterator_traits&lt;InputIterator&gt;::value_type</code> shall not invalidate iterators or
556-
subranges, nor modify elements in the range <code>[first,last)</code>.
553+
<del2>
554+
<code>typename iterator_traits&lt;InputIterator&gt;::value_type{}</code>
555+
shall be a valid expression. The <code>operator+</code> function associated with
556+
<code>iterator_traits&lt;InputIterator&gt;::value_type</code> shall not invalidate iterators or
557+
subranges, nor modify elements in the range <code>[first,last)</code>.
558+
</del2>
557559
</cxx-requires>
558560

559561
<cxx-complexity>
560-
O(<code>last - first</code>) applications of <code>operator+</code>.
562+
<del2>O(<code>last - first</code>) applications of <code>operator+</code>.</del2>
561563
</cxx-complexity>
562564

563565
<cxx-notes>
564-
The primary difference between <code>reduce</code> and <code>accumulate</code> is that the behavior
565-
of <code>reduce</code> may be non-deterministic for non-associative or non-commutative
566-
<code>operator+</code>.
566+
<del2>
567+
The primary difference between <code>reduce</code> and <code>accumulate</code> is that the behavior
568+
of <code>reduce</code> may be non-deterministic for non-associative or non-commutative
569+
<code>operator+</code>.
570+
</del2>
567571
</cxx-notes>
568572
</cxx-function>
569573

@@ -578,17 +582,21 @@ <h1>Reduce</h1>
578582
</cxx-returns>
579583

580584
<cxx-requires>
581-
The <code>operator+</code> function associated with <code>T</code> shall not invalidate iterators
582-
or subranges, nor modify elements in the range <code>[first,last)</code>.
585+
<del2>
586+
The <code>operator+</code> function associated with <code>T</code> shall not invalidate iterators
587+
or subranges, nor modify elements in the range <code>[first,last)</code>.
588+
</del2>
583589
</cxx-requires>
584590

585591
<cxx-complexity>
586-
O(<code>last - first</code>) applications of <code>operator+</code>.
592+
<del2>O(<code>last - first</code>) applications of <code>operator+</code>.</del2>
587593
</cxx-complexity>
588594

589595
<cxx-notes>
590-
The primary difference between <code>reduce</code> and <code>accumulate</code> is that the behavior
591-
of <code>reduce</code> may be non-deterministic for non-associative or non-commutative <code>operator+</code>.
596+
<del2>
597+
The primary difference between <code>reduce</code> and <code>accumulate</code> is that the behavior
598+
of <code>reduce</code> may be non-deterministic for non-associative or non-commutative <code>operator+</code>.
599+
</del2>
592600
</cxx-notes>
593601
</cxx-function>
594602

0 commit comments

Comments
 (0)