Skip to content

Commit

Permalink
Update to boost 1.63
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Konicek committed Mar 9, 2017
1 parent 9ebce17 commit cf63e08
Show file tree
Hide file tree
Showing 6,343 changed files with 618,180 additions and 180,183 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_STORE
6 changes: 3 additions & 3 deletions boost/accumulators/framework/depends_on.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,13 @@ namespace boost { namespace accumulators
template<typename First, typename Last>
struct build_acc_list<First, Last, true>
{
typedef fusion::nil type;
typedef fusion::nil_ type;

template<typename Args>
static fusion::nil
static fusion::nil_
call(Args const &, First const&, Last const&)
{
return fusion::nil();
return fusion::nil_();
}
};

Expand Down
6 changes: 5 additions & 1 deletion boost/accumulators/statistics/times2_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define BOOST_ACCUMULATORS_STATISTICS_TIMES2_ITERATOR_HPP_DE_01_01_2006

#include <functional>
#include <boost/detail/workaround.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/iterator_range.hpp>
Expand All @@ -34,13 +35,16 @@ namespace detail
);
}


///////////////////////////////////////////////////////////////////////////////
// lvalue_index_iterator
template<typename Base>
struct lvalue_index_iterator
: Base
{
lvalue_index_iterator()
: Base()
{}

lvalue_index_iterator(Base base)
: Base(base)
{
Expand Down
88 changes: 88 additions & 0 deletions boost/algorithm/algorithm.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/*
Copyright (c) Marshall Clow 2014.
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Revision history:
2 Dec 2014 mtc First version; power
*/

/// \file algorithm.hpp
/// \brief Misc Algorithms
/// \author Marshall Clow
///

#ifndef BOOST_ALGORITHM_HPP
#define BOOST_ALGORITHM_HPP

#include <functional> // for plus and multiplies

#include <boost/utility/enable_if.hpp> // for boost::disable_if
#include <boost/type_traits/is_integral.hpp>

namespace boost { namespace algorithm {

template <typename T>
T identity_operation ( std::multiplies<T> ) { return T(1); }

template <typename T>
T identity_operation ( std::plus<T> ) { return T(0); }


/// \fn power ( T x, Integer n )
/// \return the value "x" raised to the power "n"
///
/// \param x The value to be exponentiated
/// \param n The exponent (must be >= 0)
///
// \remark Taken from Knuth, The Art of Computer Programming, Volume 2:
// Seminumerical Algorithms, Section 4.6.3
template <typename T, typename Integer>
typename boost::enable_if<boost::is_integral<Integer>, T>::type
power (T x, Integer n) {
T y = 1; // Should be "T y{1};"
if (n == 0) return y;
while (true) {
if (n % 2 == 1) {
y = x * y;
if (n == 1)
return y;
}
n = n / 2;
x = x * x;
}
return y;
}

/// \fn power ( T x, Integer n, Operation op )
/// \return the value "x" raised to the power "n"
/// using the operation "op".
///
/// \param x The value to be exponentiated
/// \param n The exponent (must be >= 0)
/// \param op The operation used
///
// \remark Taken from Knuth, The Art of Computer Programming, Volume 2:
// Seminumerical Algorithms, Section 4.6.3
template <typename T, typename Integer, typename Operation>
typename boost::enable_if<boost::is_integral<Integer>, T>::type
power (T x, Integer n, Operation op) {
T y = identity_operation(op);
if (n == 0) return y;
while (true) {
if (n % 2 == 1) {
y = op(x, y);
if (n == 1)
return y;
}
n = n / 2;
x = op(x, x);
}
return y;
}

}}

#endif // BOOST_ALGORITHM_HPP
8 changes: 0 additions & 8 deletions boost/algorithm/cxx11/all_of.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,11 @@
#ifndef BOOST_ALGORITHM_ALL_OF_HPP
#define BOOST_ALGORITHM_ALL_OF_HPP

#include <algorithm> // for std::all_of, if available
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>

namespace boost { namespace algorithm {

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

/// \fn all_of ( const Range &r, Predicate p )
/// \return true if all elements in the range satisfy the predicate 'p'
Expand Down
6 changes: 0 additions & 6 deletions boost/algorithm/cxx11/any_of.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,11 @@
#ifndef BOOST_ALGORITHM_ANY_OF_HPP
#define BOOST_ALGORITHM_ANY_OF_HPP

#include <algorithm> // for std::any_of, if available
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>

namespace boost { namespace algorithm {

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

/// \fn any_of ( const Range &r, Predicate p )
/// \return true if any elements in the range satisfy the predicate 'p'
Expand Down
9 changes: 1 addition & 8 deletions boost/algorithm/cxx11/copy_if.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@
#ifndef BOOST_ALGORITHM_COPY_IF_HPP
#define BOOST_ALGORITHM_COPY_IF_HPP

#include <algorithm> // for std::copy_if, if available
#include <utility> // for std::pair, std::make_pair
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>

namespace boost { namespace algorithm {

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

/// \fn copy_if ( const Range &r, OutputIterator result, Predicate p )
/// \brief Copies all the elements from the input range that satisfy the
Expand Down
9 changes: 0 additions & 9 deletions boost/algorithm/cxx11/copy_n.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,8 @@
#ifndef BOOST_ALGORITHM_COPY_N_HPP
#define BOOST_ALGORITHM_COPY_N_HPP

#include <algorithm> // for std::copy_n, if available

namespace boost { namespace algorithm {

#if __cplusplus >= 201103L
// Use the C++11 versions of copy_n if it is available
using std::copy_n; // Section 25.3.1
#else
/// \fn copy_n ( InputIterator first, Size n, OutputIterator result )
/// \brief Copies exactly n (n > 0) elements from the range starting at first to
/// the range starting at result.
Expand All @@ -29,16 +23,13 @@ using std::copy_n; // Section 25.3.1
/// \param n The number of elements to copy
/// \param result An output iterator to write the results into
/// \note This function is part of the C++2011 standard library.
/// We will use the standard one if it is available,
/// otherwise we have our own implementation.
template <typename InputIterator, typename Size, typename OutputIterator>
OutputIterator copy_n ( InputIterator first, Size n, OutputIterator result )
{
for ( ; n > 0; --n, ++first, ++result )
*result = *first;
return result;
}
#endif
}} // namespace boost and algorithm

#endif // BOOST_ALGORITHM_COPY_IF_HPP
9 changes: 0 additions & 9 deletions boost/algorithm/cxx11/find_if_not.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,11 @@
#ifndef BOOST_ALGORITHM_FIND_IF_NOT_HPP
#define BOOST_ALGORITHM_FIND_IF_NOT_HPP

#include <algorithm> // for std::find_if_not, if it exists

#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>

namespace boost { namespace algorithm {

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

/// \fn find_if_not ( const Range &r, Predicate p )
/// \brief Finds the first element in the sequence that does not satisfy the predicate.
Expand Down
9 changes: 0 additions & 9 deletions boost/algorithm/cxx11/iota.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,24 @@
#ifndef BOOST_ALGORITHM_IOTA_HPP
#define BOOST_ALGORITHM_IOTA_HPP

#include <numeric>

#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>

namespace boost { namespace algorithm {

#if __cplusplus >= 201103L
// Use the C++11 versions of iota if it is available
using std::iota; // Section 26.7.6
#else
/// \fn iota ( ForwardIterator first, ForwardIterator last, T value )
/// \brief Generates an increasing sequence of values, and stores them in [first, last)
///
/// \param first The start of the input sequence
/// \param last One past the end of the input sequence
/// \param value The initial value of the sequence to be generated
/// \note This function is part of the C++2011 standard library.
/// We will use the standard one if it is available,
/// otherwise we have our own implementation.
template <typename ForwardIterator, typename T>
void iota ( ForwardIterator first, ForwardIterator last, T value )
{
for ( ; first != last; ++first, ++value )
*first = value;
}
#endif

/// \fn iota ( Range &r, T value )
/// \brief Generates an increasing sequence of values, and stores them in the input Range.
Expand Down
9 changes: 0 additions & 9 deletions boost/algorithm/cxx11/is_partitioned.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,18 @@
#ifndef BOOST_ALGORITHM_IS_PARTITIONED_HPP
#define BOOST_ALGORITHM_IS_PARTITIONED_HPP

#include <algorithm> // for std::is_partitioned, if available

#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>

namespace boost { namespace algorithm {

#if __cplusplus >= 201103L
// Use the C++11 versions of is_partitioned if it is available
using std::is_partitioned; // Section 25.3.13
#else
/// \fn is_partitioned ( InputIterator first, InputIterator last, UnaryPredicate p )
/// \brief Tests to see if a sequence is partitioned according to a predicate
///
/// \param first The start of the input sequence
/// \param last One past the end of the input sequence
/// \param p The predicate to test the values with
/// \note This function is part of the C++2011 standard library.
/// We will use the standard one if it is available,
/// otherwise we have our own implementation.
template <typename InputIterator, typename UnaryPredicate>
bool is_partitioned ( InputIterator first, InputIterator last, UnaryPredicate p )
{
Expand All @@ -45,7 +37,6 @@ bool is_partitioned ( InputIterator first, InputIterator last, UnaryPredicate p
return false;
return true;
}
#endif

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

0 comments on commit cf63e08

Please sign in to comment.