Boost C++ Libraries: Ticket #9367: Minor typo in Boost.Algorithm
https://svn.boost.org/trac10/ticket/9367
<p>
Patch attached for fixing it.
</p>
<p>
Additional comments:
</p>
<p>
In <code>ordered-hpp.qbk</code>, the iterator requirements for <code>is_sorted</code> say
</p>
<blockquote>
<p>
The is_sorted functions will work on all kinds of iterators (except output iterators).
</p>
</blockquote>
<p>
So I think it would be better to use <code>InputIterator</code> rather than <code>Iterator</code> for template parameters:
</p>
<div class="wiki-code">
<div class="diff">
<ul class="entries">
<li class="entry">
<h2>
<a>libs/algorithm/doc/ordered-hpp.qbk</a>
</h2>
<table class="trac-diff inline" cellspacing="0">
<colgroup>
<col class="lineno"/><col class="lineno"/><col class="content"/>
</colgroup>
<thead>
<tr>
<th title="File libs/algorithm/doc/ordered-hpp.qbk (revision 86541)">
</th>
<th title="File libs/algorithm/doc/ordered-hpp.qbk (working copy)">
</th>
<td>
<em></em>
</td>
</tr>
</thead>
<tbody class="unmod">
<tr>
<th>19</th><th>19</th><td class="l"><span></span></td>
</tr>
<tr>
<th>20</th><th>20</th><td class="l"><span>``</span></td>
</tr>
<tr>
<th>21</th><th>21</th><td class="l"><span>namespace boost { namespace algorithm {</span></td>
</tr>
</tbody>
<tbody class="mod">
<tr class="first">
<th>22</th><th> </th><td class="l"><span> template <typename I<del></del>terator, typename Pred></span></td>
</tr>
<tr>
<th>23</th><th> </th><td class="l"><span> bool is_sorted ( I<del>terator first, </del>Iterator last, Pred p );</span></td>
</tr>
<tr>
<th> </th><th>22</th><td class="r"><span> template <typename I<ins>nputI</ins>terator, typename Pred></span></td>
</tr>
<tr class="last">
<th> </th><th>23</th><td class="r"><span> bool is_sorted ( I<ins>nputIterator first, Input</ins>Iterator last, Pred p );</span></td>
</tr>
</tbody>
<tbody class="unmod">
<tr>
<th>24</th><th>24</th><td class="l"><span> </span></td>
</tr>
</tbody>
<tbody class="mod">
<tr class="first">
<th>25</th><th> </th><td class="l"><span> template <typename I<del></del>terator></span></td>
</tr>
<tr>
<th>26</th><th> </th><td class="l"><span> bool is_sorted ( I<del>terator first, </del>Iterator last );</span></td>
</tr>
<tr>
<th> </th><th>25</th><td class="r"><span> template <typename I<ins>nputI</ins>terator></span></td>
</tr>
<tr class="last">
<th> </th><th>26</th><td class="r"><span> bool is_sorted ( I<ins>nputIterator first, Input</ins>Iterator last );</span></td>
</tr>
</tbody>
<tbody class="unmod">
<tr>
<th>27</th><th>27</th><td class="l"><span> </span></td>
</tr>
<tr>
<th>28</th><th>28</th><td class="l"><span> </span></td>
</tr>
<tr>
<th>29</th><th>29</th><td class="l"><span> template <typename Range, typename Pred></span></td>
</tr>
</tbody>
</table>
</li>
</ul>
</div></div><p>
Ditto for is_decreasing/increasing and is_strictly_decreasing/increasing.
</p>
<p>
In <code>is_sorted.hpp</code>, the DOXYGEN comments for <code>is_sorted</code> use <code>ForwardIterator</code>.
Is that a typo of <code>InputIterator</code>?
Ditto for is_decreasing/increasing and is_strictly_decreasing/increasing.
</p>
en-us
Boost C++ Libraries
/htdocs/site/boost.png
https://svn.boost.org/trac10/ticket/9367
Trac 1.4.3
-
oss.2012.team+2013C@…
Tue, 12 Nov 2013 03:57:28 GMT
attachment set
https://svn.boost.org/trac10/ticket/9367
https://svn.boost.org/trac10/ticket/9367
<ul>
<li><strong>attachment</strong>
→ <span class="trac-field-new">algorithm_typo_fix.patch</span>
</li>
</ul>
<p>
Typo fix for Boost.Algorithm
</p>
Ticket
-
Marshall Clow
Sun, 17 Nov 2013 20:47:04 GMT
<link>https://svn.boost.org/trac10/ticket/9367#comment:1 </link>
<guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9367#comment:1</guid>
<description>
<p>
I changed the requirements for is_sorted to use forward iterators or better (instead of input iterators).
</p>
<p>
This matches the requirements in the C++11 standard. Updated the documentation to reflect this.
</p>
</description>
<category>Ticket</category>
</item>
<item>
<dc:creator>Marshall Clow</dc:creator>
<pubDate>Sun, 17 Nov 2013 20:47:15 GMT</pubDate>
<title/>
<link>https://svn.boost.org/trac10/ticket/9367#comment:2 </link>
<guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9367#comment:2</guid>
<description>
<p>
(In <a class="changeset" href="https://svn.boost.org/trac10/changeset/86741" title="Updated docs for is_sorted, etc. Refs #9367">[86741]</a>) Updated docs for is_sorted, etc. Refs <a class="new ticket" href="https://svn.boost.org/trac10/ticket/9367" title="#9367: Bugs: Minor typo in Boost.Algorithm (new)">#9367</a>
</p>
</description>
<category>Ticket</category>
</item>
<item>
<author>oss.2012.team+2013C@…</author>
<pubDate>Sun, 17 Nov 2013 22:52:38 GMT</pubDate>
<title/>
<link>https://svn.boost.org/trac10/ticket/9367#comment:3 </link>
<guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9367#comment:3</guid>
<description>
<p>
Thanks for clarifying the doc!
FYI, the attached patch fixes pure typos that are not fixed in <a class="changeset" href="https://svn.boost.org/trac10/changeset/86741" title="Updated docs for is_sorted, etc. Refs #9367">r86741</a>.
</p>
</description>
<category>Ticket</category>
</item>
</channel>
</rss>