Opened 9 years ago
Last modified 9 years ago
#9367 new Bugs
Minor typo in Boost.Algorithm
Reported by: | Owned by: | Marshall Clow | |
---|---|---|---|
Milestone: | To Be Determined | Component: | algorithm |
Version: | Boost Development Trunk | Severity: | Cosmetic |
Keywords: | Cc: |
Description
Patch attached for fixing it.
Additional comments:
In ordered-hpp.qbk
, the iterator requirements for is_sorted
say
The is_sorted functions will work on all kinds of iterators (except output iterators).
So I think it would be better to use InputIterator
rather than Iterator
for template parameters:
-
libs/algorithm/doc/ordered-hpp.qbk
19 19 20 20 `` 21 21 namespace boost { namespace algorithm { 22 template <typename I terator, typename Pred>23 bool is_sorted ( I terator first,Iterator last, Pred p );22 template <typename InputIterator, typename Pred> 23 bool is_sorted ( InputIterator first, InputIterator last, Pred p ); 24 24 25 template <typename I terator>26 bool is_sorted ( I terator first,Iterator last );25 template <typename InputIterator> 26 bool is_sorted ( InputIterator first, InputIterator last ); 27 27 28 28 29 29 template <typename Range, typename Pred>
Ditto for is_decreasing/increasing and is_strictly_decreasing/increasing.
In is_sorted.hpp
, the DOXYGEN comments for is_sorted
use ForwardIterator
.
Is that a typo of InputIterator
?
Ditto for is_decreasing/increasing and is_strictly_decreasing/increasing.
Attachments (1)
Change History (4)
by , 9 years ago
Attachment: | algorithm_typo_fix.patch added |
---|
comment:1 by , 9 years ago
I changed the requirements for is_sorted to use forward iterators or better (instead of input iterators).
This matches the requirements in the C++11 standard. Updated the documentation to reflect this.
comment:3 by , 9 years ago
Thanks for clarifying the doc! FYI, the attached patch fixes pure typos that are not fixed in r86741.
Typo fix for Boost.Algorithm