Skip to content

Commit 1ee006e

Browse files
committed
Update
1 parent e4a6423 commit 1ee006e

File tree

3,304 files changed

+83823
-73957
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,304 files changed

+83823
-73957
lines changed

accumulate.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
<span class='keyword'>template</span><span class='anglebracket'>&lt;</span><span class='keyword'>class</span> InputIterator, <span class='keyword'>class</span> T, <span class='keyword'>class</span> BinaryOperation<span class='anglebracket'>&gt;</span>
44
<span class='keyword'>constexpr</span> T accumulate<span class='parenthesis'>(</span>InputIterator first, InputIterator last, T init,
55
BinaryOperation binary_op<span class='parenthesis'>)</span>;
6-
</code></div></div></div><div class='para' id='1'><div class='marginalizedparent'><a class='marginalized' href='#1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/cplusplus/draft/tree/bf43925ff0d9e80997918e98989892b4c7bf15f7/source/algorithms.tex#L9944'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><i >Preconditions</i>: <span class='texttt'>T</span> meets
6+
</code></div></div></div><div class='para' id='1'><div class='marginalizedparent'><a class='marginalized' href='#1'>1</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/cplusplus/draft/tree/399b93910d0bb6f5632405ad188e9f4aad0ae99a/source/algorithms.tex#L9925'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'><i >Preconditions</i>: <span class='texttt'>T</span> meets
77
the <a href='utility.arg.requirements#:Cpp17CopyConstructible' title='16.4.4.2&emsp;Template argument requirements&emsp;[utility.arg.requirements]'><i >Cpp17CopyConstructible</i></a> (Table <a href='utility.arg.requirements#tab:cpp17.copyconstructible' title='Table 32: Cpp17CopyConstructible requirements (in addition to Cpp17MoveConstructible)'>32</a>)
88
and <a href='utility.arg.requirements#:Cpp17CopyAssignable' title='16.4.4.2&emsp;Template argument requirements&emsp;[utility.arg.requirements]'><i >Cpp17CopyAssignable</i></a> (Table <a href='utility.arg.requirements#tab:cpp17.copyassignable' title='Table 34: Cpp17CopyAssignable requirements (in addition to Cpp17MoveAssignable)'>34</a>) requirements<a class='hidden_link' href='#1.sentence-1'>.</a></div> <div id='1.sentence-2' class='sentence'>In the range [<span class='texttt'>first, last</span>],
99
<span class='texttt'>binary_<span class='shy'></span>op</span> neither modifies elements
10-
nor invalidates iterators or subranges<a class='hidden_link' href='#1.sentence-2'>.</a><a class='footnoteref' href='#footnote-210' id='footnoteref-210' title='The use of fully closed ranges is intentional.'>210</a></div></div></div></div><div class='para' id='2'><div class='marginalizedparent'><a class='marginalized' href='#2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/cplusplus/draft/tree/bf43925ff0d9e80997918e98989892b4c7bf15f7/source/algorithms.tex#L9956'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><i >Effects</i>: Computes its result by
10+
nor invalidates iterators or subranges<a class='hidden_link' href='#1.sentence-2'>.</a><a class='footnoteref' href='#footnote-208' id='footnoteref-208' title='The use of fully closed ranges is intentional.'>208</a></div></div></div></div><div class='para' id='2'><div class='marginalizedparent'><a class='marginalized' href='#2'>2</a></div><div class='itemdescr'><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/cplusplus/draft/tree/399b93910d0bb6f5632405ad188e9f4aad0ae99a/source/algorithms.tex#L9937'>#</a></div><div class='texpara'><div id='2.sentence-1' class='sentence'><i >Effects</i>: Computes its result by
1111
initializing the accumulator <span class='texttt'>acc</span> with the initial value <span class='texttt'>init</span>
1212
and then modifies it with
1313
<span class='texttt'>acc <span class='operator'>=</span> std<span class='operator'>&#x200b;::&#x200b;</span>move<span class='parenthesis'>(</span>acc<span class='parenthesis'>)</span> <span class='operator'>+</span> <span class='operator'>*</span>i</span> or
1414
<span class='texttt'>acc <span class='operator'>=</span> binary_<span class='shy'></span>op<span class='parenthesis'>(</span>std<span class='operator'>&#x200b;::&#x200b;</span>move<span class='parenthesis'>(</span>acc<span class='parenthesis'>)</span>, <span class='operator'>*</span>i<span class='parenthesis'>)</span></span>
15-
for every iterator <span class='texttt'>i</span> in the range [<span class='texttt'>first, last</span>) in order<a class='hidden_link' href='#2.sentence-1'>.</a><a class='footnoteref' href='#footnote-211' id='footnoteref-211' title='accumulate is similar to the APL reduction operator and Common Lisp reduce function, but it avoids the difficulty of defining the result of reduction on an empty sequence by always requiring an initial value.'>211</a></div></div></div></div><div class='footnoteSeparator'></div><div class='footnote' id='footnote-210'><div class='texpara'><a class='footnotenum' href='#footnote-210'>210)</a><a class='footnoteBacklink' href='#footnoteref-210'>210)</a> <div id='footnote-210.sentence-1' class='sentence'>The use of fully closed ranges is intentional<a class='hidden_link' href='#footnote-210.sentence-1'>.</a></div></div></div><div class='footnote' id='footnote-211'><div class='texpara'><a class='footnotenum' href='#footnote-211'>211)</a><a class='footnoteBacklink' href='#footnoteref-211'>211)</a> <div id='footnote-211.sentence-1' class='sentence'><span class='texttt'>accumulate</span> is similar
15+
for every iterator <span class='texttt'>i</span> in the range [<span class='texttt'>first, last</span>) in order<a class='hidden_link' href='#2.sentence-1'>.</a><a class='footnoteref' href='#footnote-209' id='footnoteref-209' title='accumulate is similar to the APL reduction operator and Common Lisp reduce function, but it avoids the difficulty of defining the result of reduction on an empty sequence by always requiring an initial value.'>209</a></div></div></div></div><div class='footnoteSeparator'></div><div class='footnote' id='footnote-208'><div class='texpara'><a class='footnotenum' href='#footnote-208'>208)</a><a class='footnoteBacklink' href='#footnoteref-208'>208)</a> <div id='footnote-208.sentence-1' class='sentence'>The use of fully closed ranges is intentional<a class='hidden_link' href='#footnote-208.sentence-1'>.</a></div></div></div><div class='footnote' id='footnote-209'><div class='texpara'><a class='footnotenum' href='#footnote-209'>209)</a><a class='footnoteBacklink' href='#footnoteref-209'>209)</a> <div id='footnote-209.sentence-1' class='sentence'><span class='texttt'>accumulate</span> is similar
1616
to the APL reduction operator and Common Lisp reduce function,
1717
but it avoids the difficulty of defining the result of reduction
18-
on an empty sequence by always requiring an initial value<a class='hidden_link' href='#footnote-211.sentence-1'>.</a></div></div></div></div></body></html>
18+
on an empty sequence by always requiring an initial value<a class='hidden_link' href='#footnote-209.sentence-1'>.</a></div></div></div></div></body></html>

0 commit comments

Comments
 (0)