Skip to content

Commit cf63e08

Browse files
author
Martin Konicek
committed
Update to boost 1.63
1 parent 9ebce17 commit cf63e08

File tree

6,343 files changed

+618180
-180183
lines changed

Some content is hidden

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

6,343 files changed

+618180
-180183
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_STORE

boost/accumulators/framework/depends_on.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,13 @@ namespace boost { namespace accumulators
223223
template<typename First, typename Last>
224224
struct build_acc_list<First, Last, true>
225225
{
226-
typedef fusion::nil type;
226+
typedef fusion::nil_ type;
227227

228228
template<typename Args>
229-
static fusion::nil
229+
static fusion::nil_
230230
call(Args const &, First const&, Last const&)
231231
{
232-
return fusion::nil();
232+
return fusion::nil_();
233233
}
234234
};
235235

boost/accumulators/statistics/times2_iterator.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#define BOOST_ACCUMULATORS_STATISTICS_TIMES2_ITERATOR_HPP_DE_01_01_2006
1010

1111
#include <functional>
12+
#include <boost/detail/workaround.hpp>
1213
#include <boost/range/begin.hpp>
1314
#include <boost/range/end.hpp>
1415
#include <boost/range/iterator_range.hpp>
@@ -34,13 +35,16 @@ namespace detail
3435
);
3536
}
3637

37-
3838
///////////////////////////////////////////////////////////////////////////////
3939
// lvalue_index_iterator
4040
template<typename Base>
4141
struct lvalue_index_iterator
4242
: Base
4343
{
44+
lvalue_index_iterator()
45+
: Base()
46+
{}
47+
4448
lvalue_index_iterator(Base base)
4549
: Base(base)
4650
{

boost/algorithm/algorithm.hpp

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
/*
2+
Copyright (c) Marshall Clow 2014.
3+
4+
Distributed under the Boost Software License, Version 1.0. (See accompanying
5+
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6+
7+
Revision history:
8+
2 Dec 2014 mtc First version; power
9+
10+
*/
11+
12+
/// \file algorithm.hpp
13+
/// \brief Misc Algorithms
14+
/// \author Marshall Clow
15+
///
16+
17+
#ifndef BOOST_ALGORITHM_HPP
18+
#define BOOST_ALGORITHM_HPP
19+
20+
#include <functional> // for plus and multiplies
21+
22+
#include <boost/utility/enable_if.hpp> // for boost::disable_if
23+
#include <boost/type_traits/is_integral.hpp>
24+
25+
namespace boost { namespace algorithm {
26+
27+
template <typename T>
28+
T identity_operation ( std::multiplies<T> ) { return T(1); }
29+
30+
template <typename T>
31+
T identity_operation ( std::plus<T> ) { return T(0); }
32+
33+
34+
/// \fn power ( T x, Integer n )
35+
/// \return the value "x" raised to the power "n"
36+
///
37+
/// \param x The value to be exponentiated
38+
/// \param n The exponent (must be >= 0)
39+
///
40+
// \remark Taken from Knuth, The Art of Computer Programming, Volume 2:
41+
// Seminumerical Algorithms, Section 4.6.3
42+
template <typename T, typename Integer>
43+
typename boost::enable_if<boost::is_integral<Integer>, T>::type
44+
power (T x, Integer n) {
45+
T y = 1; // Should be "T y{1};"
46+
if (n == 0) return y;
47+
while (true) {
48+
if (n % 2 == 1) {
49+
y = x * y;
50+
if (n == 1)
51+
return y;
52+
}
53+
n = n / 2;
54+
x = x * x;
55+
}
56+
return y;
57+
}
58+
59+
/// \fn power ( T x, Integer n, Operation op )
60+
/// \return the value "x" raised to the power "n"
61+
/// using the operation "op".
62+
///
63+
/// \param x The value to be exponentiated
64+
/// \param n The exponent (must be >= 0)
65+
/// \param op The operation used
66+
///
67+
// \remark Taken from Knuth, The Art of Computer Programming, Volume 2:
68+
// Seminumerical Algorithms, Section 4.6.3
69+
template <typename T, typename Integer, typename Operation>
70+
typename boost::enable_if<boost::is_integral<Integer>, T>::type
71+
power (T x, Integer n, Operation op) {
72+
T y = identity_operation(op);
73+
if (n == 0) return y;
74+
while (true) {
75+
if (n % 2 == 1) {
76+
y = op(x, y);
77+
if (n == 1)
78+
return y;
79+
}
80+
n = n / 2;
81+
x = op(x, x);
82+
}
83+
return y;
84+
}
85+
86+
}}
87+
88+
#endif // BOOST_ALGORITHM_HPP

boost/algorithm/cxx11/all_of.hpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,11 @@
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

1918
namespace boost { namespace algorithm {
2019

21-
#if __cplusplus >= 201103L
22-
// Use the C++11 versions of all_of if it is available
23-
using std::all_of; // Section 25.2.1
24-
#else
2520
/// \fn all_of ( InputIterator first, InputIterator last, Predicate p )
2621
/// \return true if all elements in [first, last) satisfy the predicate 'p'
2722
/// \note returns true on an empty range
@@ -31,8 +26,6 @@ using std::all_of; // Section 25.2.1
3126
/// \param p A predicate for testing the elements of the sequence
3227
///
3328
/// \note This function is part of the C++2011 standard library.
34-
/// We will use the standard one if it is available,
35-
/// otherwise we have our own implementation.
3629
template<typename InputIterator, typename Predicate>
3730
bool all_of ( InputIterator first, InputIterator last, Predicate p )
3831
{
@@ -41,7 +34,6 @@ bool all_of ( InputIterator first, InputIterator last, Predicate p )
4134
return false;
4235
return true;
4336
}
44-
#endif
4537

4638
/// \fn all_of ( const Range &r, Predicate p )
4739
/// \return true if all elements in the range satisfy the predicate 'p'

boost/algorithm/cxx11/any_of.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,11 @@
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

2120
namespace boost { namespace algorithm {
2221

23-
// Use the C++11 versions of any_of if it is available
24-
#if __cplusplus >= 201103L
25-
using std::any_of; // Section 25.2.2
26-
#else
2722
/// \fn any_of ( InputIterator first, InputIterator last, Predicate p )
2823
/// \return true if any of the elements in [first, last) satisfy the predicate
2924
/// \note returns false on an empty range
@@ -40,7 +35,6 @@ bool any_of ( InputIterator first, InputIterator last, Predicate p )
4035
return true;
4136
return false;
4237
}
43-
#endif
4438

4539
/// \fn any_of ( const Range &r, Predicate p )
4640
/// \return true if any elements in the range satisfy the predicate 'p'

boost/algorithm/cxx11/copy_if.hpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,12 @@
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

1919
namespace boost { namespace algorithm {
2020

21-
#if __cplusplus >= 201103L
22-
// Use the C++11 versions of copy_if if it is available
23-
using std::copy_if; // Section 25.3.1
24-
#else
2521
/// \fn copy_if ( InputIterator first, InputIterator last, OutputIterator result, Predicate p )
2622
/// \brief Copies all the elements from the input range that satisfy the
2723
/// predicate to the output range.
@@ -32,8 +28,6 @@ using std::copy_if; // Section 25.3.1
3228
/// \param result An output iterator to write the results into
3329
/// \param p A predicate for testing the elements of the range
3430
/// \note This function is part of the C++2011 standard library.
35-
/// We will use the standard one if it is available,
36-
/// otherwise we have our own implementation.
3731
template<typename InputIterator, typename OutputIterator, typename Predicate>
3832
OutputIterator copy_if ( InputIterator first, InputIterator last, OutputIterator result, Predicate p )
3933
{
@@ -42,7 +36,6 @@ OutputIterator copy_if ( InputIterator first, InputIterator last, OutputIterator
4236
*result++ = *first;
4337
return result;
4438
}
45-
#endif
4639

4740
/// \fn copy_if ( const Range &r, OutputIterator result, Predicate p )
4841
/// \brief Copies all the elements from the input range that satisfy the

boost/algorithm/cxx11/copy_n.hpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,8 @@
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

19-
#if __cplusplus >= 201103L
20-
// Use the C++11 versions of copy_n if it is available
21-
using std::copy_n; // Section 25.3.1
22-
#else
2317
/// \fn copy_n ( InputIterator first, Size n, OutputIterator result )
2418
/// \brief Copies exactly n (n > 0) elements from the range starting at first to
2519
/// the range starting at result.
@@ -29,16 +23,13 @@ using std::copy_n; // Section 25.3.1
2923
/// \param n The number of elements to copy
3024
/// \param result An output iterator to write the results into
3125
/// \note This function is part of the C++2011 standard library.
32-
/// We will use the standard one if it is available,
33-
/// otherwise we have our own implementation.
3426
template <typename InputIterator, typename Size, typename OutputIterator>
3527
OutputIterator copy_n ( InputIterator first, Size n, OutputIterator result )
3628
{
3729
for ( ; n > 0; --n, ++first, ++result )
3830
*result = *first;
3931
return result;
4032
}
41-
#endif
4233
}} // namespace boost and algorithm
4334

4435
#endif // BOOST_ALGORITHM_COPY_IF_HPP

boost/algorithm/cxx11/find_if_not.hpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,11 @@
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

2018
namespace boost { namespace algorithm {
2119

22-
#if __cplusplus >= 201103L
23-
// Use the C++11 versions of find_if_not if it is available
24-
using std::find_if_not; // Section 25.2.5
25-
#else
2620
/// \fn find_if_not(InputIterator first, InputIterator last, Predicate p)
2721
/// \brief Finds the first element in the sequence that does not satisfy the predicate.
2822
/// \return The iterator pointing to the desired element.
@@ -31,8 +25,6 @@ using std::find_if_not; // Section 25.2.5
3125
/// \param last One past the end of the input sequence
3226
/// \param p A predicate for testing the elements of the range
3327
/// \note This function is part of the C++2011 standard library.
34-
/// We will use the standard one if it is available,
35-
/// otherwise we have our own implementation.
3628
template<typename InputIterator, typename Predicate>
3729
InputIterator find_if_not ( InputIterator first, InputIterator last, Predicate p )
3830
{
@@ -41,7 +33,6 @@ InputIterator find_if_not ( InputIterator first, InputIterator last, Predicate p
4133
break;
4234
return first;
4335
}
44-
#endif
4536

4637
/// \fn find_if_not ( const Range &r, Predicate p )
4738
/// \brief Finds the first element in the sequence that does not satisfy the predicate.

boost/algorithm/cxx11/iota.hpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,24 @@
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

2018
namespace boost { namespace algorithm {
2119

22-
#if __cplusplus >= 201103L
23-
// Use the C++11 versions of iota if it is available
24-
using std::iota; // Section 26.7.6
25-
#else
2620
/// \fn iota ( ForwardIterator first, ForwardIterator last, T value )
2721
/// \brief Generates an increasing sequence of values, and stores them in [first, last)
2822
///
2923
/// \param first The start of the input sequence
3024
/// \param last One past the end of the input sequence
3125
/// \param value The initial value of the sequence to be generated
3226
/// \note This function is part of the C++2011 standard library.
33-
/// We will use the standard one if it is available,
34-
/// otherwise we have our own implementation.
3527
template <typename ForwardIterator, typename T>
3628
void iota ( ForwardIterator first, ForwardIterator last, T value )
3729
{
3830
for ( ; first != last; ++first, ++value )
3931
*first = value;
4032
}
41-
#endif
4233

4334
/// \fn iota ( Range &r, T value )
4435
/// \brief Generates an increasing sequence of values, and stores them in the input Range.

boost/algorithm/cxx11/is_partitioned.hpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,18 @@
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

2018
namespace boost { namespace algorithm {
2119

22-
#if __cplusplus >= 201103L
23-
// Use the C++11 versions of is_partitioned if it is available
24-
using std::is_partitioned; // Section 25.3.13
25-
#else
2620
/// \fn is_partitioned ( InputIterator first, InputIterator last, UnaryPredicate p )
2721
/// \brief Tests to see if a sequence is partitioned according to a predicate
2822
///
2923
/// \param first The start of the input sequence
3024
/// \param last One past the end of the input sequence
3125
/// \param p The predicate to test the values with
3226
/// \note This function is part of the C++2011 standard library.
33-
/// We will use the standard one if it is available,
34-
/// otherwise we have our own implementation.
3527
template <typename InputIterator, typename UnaryPredicate>
3628
bool is_partitioned ( InputIterator first, InputIterator last, UnaryPredicate p )
3729
{
@@ -45,7 +37,6 @@ bool is_partitioned ( InputIterator first, InputIterator last, UnaryPredicate p
4537
return false;
4638
return true;
4739
}
48-
#endif
4940

5041
/// \fn is_partitioned ( const Range &r, UnaryPredicate p )
5142
/// \brief Generates an increasing sequence of values, and stores them in the input Range.

0 commit comments

Comments
 (0)