Skip to content

Commit ddf86ab

Browse files
committed
Use "Equivalent to return" everywhere the expression's return value is used.
1 parent 37dd0d3 commit ddf86ab

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

func.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ <h1>Class template <code>default_searcher</code></h1>
308308
<cxx-signature>template&lt;class ForwardIterator2&gt;
309309
ForwardIterator2 operator()(ForwardIterator2 first, ForwardIterator2 last) const;</cxx-signature>
310310

311-
<cxx-effects>Equivalent to <code>std::search(first, last, pat_first_, pat_last_, pred_)</code>.</cxx-effects>
311+
<cxx-effects>Equivalent to <code>return std::search(<w-br></w-br>first, last, pat_first_, pat_last_, pred_);</code></cxx-effects>
312312
</cxx-function>
313313

314314
<cxx-section id="func.searchers.default.creation">
@@ -320,7 +320,7 @@ <h1><code>default_searcher</code> creation functions</h1>
320320
make_default_searcher(ForwardIterator pat_first, ForwardIterator pat_last,
321321
BinaryPredicate pred = BinaryPredicate());</cxx-signature>
322322

323-
<cxx-effects>Equivalent to <code>default_searcher&lt;ForwardIterator, BinaryPredicate&gt;(pat_first, pat_last, pred)</code>.</cxx-effects>
323+
<cxx-effects>Equivalent to <code>return default_searcher&lt;ForwardIterator, BinaryPredicate&gt;(<w-br></w-br>pat_first, pat_last, pred);</code></cxx-effects>
324324
</cxx-function>
325325
</cxx-section>
326326
</cxx-section>
@@ -389,7 +389,7 @@ <h1><code>boyer_moore_searcher</code> creation functions</h1>
389389
make_boyer_moore_searcher(RandomAccessIterator pat_first, RandomAccessIterator pat_last,
390390
Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());</cxx-signature>
391391

392-
<cxx-effects>Equivalent to <code>boyer_moore_searcher&lt;RandomAccessIterator, Hash, BinaryPredicate&gt;(<w-br></w-br>pat_first, pat_last, hf, pred)</code>.</cxx-effects>
392+
<cxx-effects>Equivalent to <code>return boyer_moore_searcher&lt;RandomAccessIterator, Hash, BinaryPredicate&gt;(<w-br></w-br>pat_first, pat_last, hf, pred);</code></cxx-effects>
393393
</cxx-function>
394394
</cxx-section>
395395
</cxx-section>
@@ -464,7 +464,7 @@ <h1><code>boyer_moore_horspool_searcher</code> creation functions</h1>
464464
RandomAccessIterator pat_first, RandomAccessIterator pat_last,
465465
Hash hf = Hash(), BinaryPredicate pred = BinaryPredicate());</cxx-signature>
466466

467-
<cxx-effects>Equivalent to <code>boyer_moore_horspool_searcher&lt;RandomAccessIterator, Hash, BinaryPredicate&gt;(<w-br></w-br>pat_first, pat_last, hf, pred)</code>.</cxx-effects>
467+
<cxx-effects>Equivalent to <code>return boyer_moore_horspool_searcher&lt;RandomAccessIterator, Hash, BinaryPredicate&gt;(<w-br></w-br>pat_first, pat_last, hf, pred);</code></cxx-effects>
468468
</cxx-function>
469469
</cxx-section>
470470
</cxx-section>

memory.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ <h1><code>polymorphic_allocator</code> member functions</h1>
882882

883883
<cxx-function>
884884
<cxx-signature>Tp* allocate(size_t n);</cxx-signature>
885-
<cxx-returns>Equivalent to <code>static_cast&lt;Tp*>(m_resource->allocate(n * sizeof(Tp), alignof(Tp)))</code>.</cxx-returns>
885+
<cxx-returns>Equivalent to <code>return static_cast&lt;Tp*>(m_resource->allocate(n * sizeof(Tp), alignof(Tp)));</code></cxx-returns>
886886
</cxx-function>
887887

888888
<cxx-function>

string.view.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ <h1><code>basic_string_view</code> string operations</h1>
388388
explicit<cxx-footnote>This conversion is explicit to avoid accidental O(N) operations on type mismatches.</cxx-footnote> operator basic_string&lt;
389389
charT, traits, Allocator>() const;</cxx-signature>
390390

391-
<cxx-effects>Equivalent to <code>basic_string&lt;charT, traits, Allocator>(begin(), end()).</code></cxx-effects>
391+
<cxx-effects>Equivalent to <code>return basic_string&lt;charT, traits, Allocator>(begin(), end());</code></cxx-effects>
392392
<cxx-complexity>O(<code>size()</code>)</cxx-complexity>
393393
<p><cxx-note>Users who want to control the allocator instance should call <code>to_string(allocator)</code>.</cxx-note></p>
394394
</cxx-function>
@@ -440,29 +440,29 @@ <h1><code>basic_string_view</code> string operations</h1>
440440

441441
<cxx-function>
442442
<cxx-signature>constexpr int compare(size_type pos1, size_type n1, basic_string_view str) const;</cxx-signature>
443-
<cxx-effects>Equivalent to <code>substr(pos1, n1).compare(str)</code>.</cxx-effects>
443+
<cxx-effects>Equivalent to <code>return substr(pos1, n1).compare(str);</code></cxx-effects>
444444
</cxx-function>
445445

446446
<cxx-function>
447447
<cxx-signature>constexpr int compare(size_type pos1, size_type n1, basic_string_view str,
448448
size_type pos2, size_type n2) const;</cxx-signature>
449-
<cxx-effects>Equivalent to <code>substr(pos1, n1).compare(str.substr(pos2, n2))</code>.</cxx-effects>
449+
<cxx-effects>Equivalent to <code>return substr(pos1, n1).compare(str.substr(pos2, n2));</code></cxx-effects>
450450
</cxx-function>
451451

452452
<cxx-function>
453453
<cxx-signature>constexpr int compare(const charT* s) const;</cxx-signature>
454-
<cxx-effects>Equivalent to <code>compare(basic_string_view(s))</code>.</cxx-effects>
454+
<cxx-effects>Equivalent to <code>return compare(basic_string_view(s));</code></cxx-effects>
455455
</cxx-function>
456456

457457
<cxx-function>
458458
<cxx-signature>constexpr int compare(size_type pos1, size_type n1, const charT* s) const;</cxx-signature>
459-
<cxx-effects>Equivalent to <code>substr(pos1, n1).compare(basic_string_view(s))</code>.</cxx-effects>
459+
<cxx-effects>Equivalent to <code>return substr(pos1, n1).compare(basic_string_view(s));</code></cxx-effects>
460460
</cxx-function>
461461

462462
<cxx-function>
463463
<cxx-signature>constexpr int compare(size_type pos1, size_type n1,
464464
const charT* s, size_type n2) const;</cxx-signature>
465-
<cxx-effects>Equivalent to <code>substr(pos1, n1).compare(basic_string_view(s, n2))</code>.</cxx-effects>
465+
<cxx-effects>Equivalent to <code>return substr(pos1, n1).compare(basic_string_view(s, n2));</code></cxx-effects>
466466
</cxx-function>
467467

468468
<cxx-section id="string.view.find">
@@ -476,15 +476,15 @@ <h1>Searching <code>basic_string_view</code></h1>
476476

477477
<p>Each member function of the form</p>
478478
<pre><code>constexpr <var>return-type fx1</var>(const charT* s, size_type pos);</code></pre>
479-
<p class="cont">is equivalent to <code><var>fx1</var>(basic_string_view(s), pos)</code>.</p>
479+
<p class="cont">is equivalent to <code>return <var>fx1</var>(basic_string_view(s), pos);</code></p>
480480

481481
<p>Each member function of the form</p>
482482
<pre><code>constexpr <var>return-type fx1</var>(const charT* s, size_type pos, size_type n);</code></pre>
483-
<p class="cont">is equivalent to <code><var>fx1</var>(basic_string_view(s, n), pos)</code>.</p>
483+
<p class="cont">is equivalent to <code>return <var>fx1</var>(basic_string_view(s, n), pos);</code></p>
484484

485485
<p>Each member function of the form</p>
486486
<pre><code>constexpr <var>return-type fx2</var>(charT c, size_type pos);</code></pre>
487-
<p class="cont">is equivalent to <code><var>fx2</var>(basic_string_view(&amp;c, 1), pos)</code>.</p>
487+
<p class="cont">is equivalent to <code>return <var>fx2</var>(basic_string_view(&amp;c, 1), pos);</code></p>
488488

489489
<cxx-function>
490490
<cxx-signature>constexpr size_type find(basic_string_view str, size_type pos = 0) const noexcept;</cxx-signature>
@@ -678,7 +678,7 @@ <h1>Inserters and extractors</h1>
678678
operator&lt;&lt;(basic_ostream&lt;charT, traits>&amp; os,
679679
basic_string_view&lt;charT, traits> str);</cxx-signature>
680680

681-
<cxx-effects>Equivalent to <code>os &lt;&lt; str.to_string()</code>.</cxx-effects>
681+
<cxx-effects>Equivalent to <code>return os &lt;&lt; str.to_string();</code></cxx-effects>
682682
</cxx-function>
683683
</cxx-section>
684684

0 commit comments

Comments
 (0)