Skip to content

Commit 1da90fc

Browse files
committed
Remove unnecessary #include <algorithm> and correct some comments
1 parent 795c6c6 commit 1da90fc

File tree

12 files changed

+5
-38
lines changed

12 files changed

+5
-38
lines changed

include/boost/algorithm/cxx11/all_of.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#ifndef BOOST_ALGORITHM_ALL_OF_HPP
1313
#define BOOST_ALGORITHM_ALL_OF_HPP
1414

15-
#include <algorithm> // for std::all_of, if available
1615
#include <boost/range/begin.hpp>
1716
#include <boost/range/end.hpp>
1817

@@ -27,8 +26,6 @@ namespace boost { namespace algorithm {
2726
/// \param p A predicate for testing the elements of the sequence
2827
///
2928
/// \note This function is part of the C++2011 standard library.
30-
/// We will use the standard one if it is available,
31-
/// otherwise we have our own implementation.
3229
template<typename InputIterator, typename Predicate>
3330
bool all_of ( InputIterator first, InputIterator last, Predicate p )
3431
{

include/boost/algorithm/cxx11/any_of.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#ifndef BOOST_ALGORITHM_ANY_OF_HPP
1515
#define BOOST_ALGORITHM_ANY_OF_HPP
1616

17-
#include <algorithm> // for std::any_of, if available
1817
#include <boost/range/begin.hpp>
1918
#include <boost/range/end.hpp>
2019

include/boost/algorithm/cxx11/copy_if.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#ifndef BOOST_ALGORITHM_COPY_IF_HPP
1313
#define BOOST_ALGORITHM_COPY_IF_HPP
1414

15-
#include <algorithm> // for std::copy_if, if available
15+
#include <utility> // for std::pair, std::make_pair
1616
#include <boost/range/begin.hpp>
1717
#include <boost/range/end.hpp>
1818

@@ -28,8 +28,6 @@ namespace boost { namespace algorithm {
2828
/// \param result An output iterator to write the results into
2929
/// \param p A predicate for testing the elements of the range
3030
/// \note This function is part of the C++2011 standard library.
31-
/// We will use the standard one if it is available,
32-
/// otherwise we have our own implementation.
3331
template<typename InputIterator, typename OutputIterator, typename Predicate>
3432
OutputIterator copy_if ( InputIterator first, InputIterator last, OutputIterator result, Predicate p )
3533
{

include/boost/algorithm/cxx11/copy_n.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
#ifndef BOOST_ALGORITHM_COPY_N_HPP
1313
#define BOOST_ALGORITHM_COPY_N_HPP
1414

15-
#include <algorithm> // for std::copy_n, if available
16-
1715
namespace boost { namespace algorithm {
1816

1917
/// \fn copy_n ( InputIterator first, Size n, OutputIterator result )
@@ -25,8 +23,6 @@ namespace boost { namespace algorithm {
2523
/// \param n The number of elements to copy
2624
/// \param result An output iterator to write the results into
2725
/// \note This function is part of the C++2011 standard library.
28-
/// We will use the standard one if it is available,
29-
/// otherwise we have our own implementation.
3026
template <typename InputIterator, typename Size, typename OutputIterator>
3127
OutputIterator copy_n ( InputIterator first, Size n, OutputIterator result )
3228
{

include/boost/algorithm/cxx11/find_if_not.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
#ifndef BOOST_ALGORITHM_FIND_IF_NOT_HPP
1313
#define BOOST_ALGORITHM_FIND_IF_NOT_HPP
1414

15-
#include <algorithm> // for std::find_if_not, if it exists
16-
1715
#include <boost/range/begin.hpp>
1816
#include <boost/range/end.hpp>
1917

@@ -27,8 +25,6 @@ namespace boost { namespace algorithm {
2725
/// \param last One past the end of the input sequence
2826
/// \param p A predicate for testing the elements of the range
2927
/// \note This function is part of the C++2011 standard library.
30-
/// We will use the standard one if it is available,
31-
/// otherwise we have our own implementation.
3228
template<typename InputIterator, typename Predicate>
3329
InputIterator find_if_not ( InputIterator first, InputIterator last, Predicate p )
3430
{

include/boost/algorithm/cxx11/iota.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
#ifndef BOOST_ALGORITHM_IOTA_HPP
1313
#define BOOST_ALGORITHM_IOTA_HPP
1414

15-
#include <numeric>
16-
1715
#include <boost/range/begin.hpp>
1816
#include <boost/range/end.hpp>
1917

@@ -26,8 +24,6 @@ namespace boost { namespace algorithm {
2624
/// \param last One past the end of the input sequence
2725
/// \param value The initial value of the sequence to be generated
2826
/// \note This function is part of the C++2011 standard library.
29-
/// We will use the standard one if it is available,
30-
/// otherwise we have our own implementation.
3127
template <typename ForwardIterator, typename T>
3228
void iota ( ForwardIterator first, ForwardIterator last, T value )
3329
{

include/boost/algorithm/cxx11/is_partitioned.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
#ifndef BOOST_ALGORITHM_IS_PARTITIONED_HPP
1313
#define BOOST_ALGORITHM_IS_PARTITIONED_HPP
1414

15-
#include <algorithm> // for std::is_partitioned, if available
16-
1715
#include <boost/range/begin.hpp>
1816
#include <boost/range/end.hpp>
1917

@@ -26,8 +24,6 @@ namespace boost { namespace algorithm {
2624
/// \param last One past the end of the input sequence
2725
/// \param p The predicate to test the values with
2826
/// \note This function is part of the C++2011 standard library.
29-
/// We will use the standard one if it is available,
30-
/// otherwise we have our own implementation.
3127
template <typename InputIterator, typename UnaryPredicate>
3228
bool is_partitioned ( InputIterator first, InputIterator last, UnaryPredicate p )
3329
{

include/boost/algorithm/cxx11/is_permutation.hpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
#ifndef BOOST_ALGORITHM_IS_PERMUTATION11_HPP
1313
#define BOOST_ALGORITHM_IS_PERMUTATION11_HPP
1414

15-
#include <algorithm> // for std::less, tie, mismatch and is_permutation (if available)
16-
#include <utility> // for std::make_pair
15+
#include <algorithm> // for std::find_if, count_if, mismatch
16+
#include <utility> // for std::pair
1717
#include <functional> // for std::equal_to
1818
#include <iterator>
1919

@@ -108,8 +108,6 @@ namespace detail {
108108
/// \param p The predicate to compare elements with
109109
///
110110
/// \note This function is part of the C++2011 standard library.
111-
/// We will use the standard one if it is available,
112-
/// otherwise we have our own implementation.
113111
template< class ForwardIterator1, class ForwardIterator2, class BinaryPredicate >
114112
bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1,
115113
ForwardIterator2 first2, BinaryPredicate p )
@@ -135,8 +133,6 @@ bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1,
135133
/// \param last2 One past the end of the input sequence
136134
/// \param first2 The start of the second sequence
137135
/// \note This function is part of the C++2011 standard library.
138-
/// We will use the standard one if it is available,
139-
/// otherwise we have our own implementation.
140136
template< class ForwardIterator1, class ForwardIterator2 >
141137
bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2 )
142138
{

include/boost/algorithm/cxx11/is_sorted.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#ifndef BOOST_ALGORITHM_ORDERED_HPP
1414
#define BOOST_ALGORITHM_ORDERED_HPP
1515

16-
#include <algorithm>
1716
#include <functional>
1817
#include <iterator>
1918

include/boost/algorithm/cxx11/none_of.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#ifndef BOOST_ALGORITHM_NONE_OF_HPP
1313
#define BOOST_ALGORITHM_NONE_OF_HPP
1414

15-
#include <algorithm> // for std::none_of, if available
1615
#include <boost/range/begin.hpp>
1716
#include <boost/range/end.hpp>
1817

0 commit comments

Comments
 (0)