Misc Algorithms.

Marshall Clow

BOOST_CXX14_CONSTEXPR T `std::multiplies< T >`
BOOST_CXX14_CONSTEXPR T `std::plus< T >`
BOOST_CXX14_CONSTEXPR boost::enable_if< boost::is_integral< Integer >, T >::type `T

The value to be exponentiated

` `Integer

The exponent (must be >= 0)

`

the value "x" raised to the power "n"

BOOST_CXX14_CONSTEXPR boost::enable_if< boost::is_integral< Integer >, T >::type `T

The value to be exponentiated

` `Integer

The exponent (must be >= 0)

` `Operation

The operation used

`

the value "x" raised to the power "n" using the operation "op".

Apply permutation to a sequence.

Alexander Zaitsev

void `RandomAccessIterator1` `RandomAccessIterator1` `RandomAccessIterator2` `RandomAccessIterator2`
void `RandomAccessIterator1` `RandomAccessIterator1` `RandomAccessIterator2` `RandomAccessIterator2`
void `Range1 &` `Range2 &`
void `Range1 &` `Range2 &`

Clamp algorithm.

Marshall Clow

Suggested by olafvdspek in https://svn.boost.org/trac/boost/ticket/3215 `BOOST_CXX14_CONSTEXPR T const & `T const &

The value to be clamped

``typename boost::type_identity< T >::type const &

The lower bound of the range to be clamped to

``typename boost::type_identity< T >::type const &

The upper bound of the range to be clamped to

``Pred

A predicate to use to compare the values. p ( a, b ) returns a boolean.

`

the value "val" brought into the range [ lo, hi ] using the comparison predicate p. If p ( val, lo ) return lo. If p ( hi, val ) return hi. Otherwise, return the original value.

` `BOOST_CXX14_CONSTEXPR T const & `const T &``typename boost::type_identity< T >::type const &``typename boost::type_identity< T >::type const &`` `BOOST_CXX14_CONSTEXPR OutputIterator `InputIterator``InputIterator``OutputIterator``typename std::iterator_traits< InputIterator >::value_type const &``typename std::iterator_traits< InputIterator >::value_type const &`` `BOOST_CXX14_CONSTEXPR boost::disable_if_c< boost::is_same< Range, OutputIterator >::value, OutputIterator >::type `const Range &

The range of values to be clamped

``OutputIterator

An output iterator to write the clamped values into

``typename std::iterator_traits< typename boost::range_iterator< const Range >::type >::value_type const &

The lower bound of the range to be clamped to

``typename std::iterator_traits< typename boost::range_iterator< const Range >::type >::value_type const &

The upper bound of the range to be clamped to

`

clamp the sequence of values [first, last) into [ lo, hi ]

` `BOOST_CXX14_CONSTEXPR OutputIterator `InputIterator``InputIterator``OutputIterator``typename std::iterator_traits< InputIterator >::value_type const &``typename std::iterator_traits< InputIterator >::value_type const &``Pred`` `BOOST_CXX14_CONSTEXPR boost::disable_if_c< boost::is_same< Range, OutputIterator >::value, OutputIterator >::type `const Range &

The range of values to be clamped

``OutputIterator

An output iterator to write the clamped values into

``typename std::iterator_traits< typename boost::range_iterator< const Range >::type >::value_type const &

The lower bound of the range to be clamped to

``typename std::iterator_traits< typename boost::range_iterator< const Range >::type >::value_type const &

The upper bound of the range to be clamped to

``Pred

A predicate to use to compare the values. p ( a, b ) returns a boolean.

`

clamp the sequence of values [first, last) into [ lo, hi ] using the comparison predicate p.

`

Test ranges to see if all elements match a value or predicate.

Marshall Clow

BOOST_CXX14_CONSTEXPR bool `InputIterator

The start of the input sequence

` `InputIterator

One past the end of the input sequence

` `Predicate

A predicate for testing the elements of the sequence

`

returns true on an empty range

This function is part of the C++2011 standard library.

true if all elements in [first, last) satisfy the predicate 'p'

BOOST_CXX14_CONSTEXPR bool `const Range &

The input range

` `Predicate

A predicate for testing the elements of the range

`

returns true on an empty range

true if all elements in the range satisfy the predicate 'p'

BOOST_CXX14_CONSTEXPR bool `InputIterator

The start of the input sequence

` `InputIterator

One past the end of the input sequence

` `const T &

A value to compare against

`

returns true on an empty range

true if all elements in [first, last) are equal to 'val'

BOOST_CXX14_CONSTEXPR bool `const Range &

The input range

` `const T &

A value to compare against

`

returns true on an empty range

true if all elements in the range are equal to 'val'

Test ranges to see if any elements match a value or predicate.

Marshall Clow

BOOST_CXX14_CONSTEXPR bool `InputIterator

The start of the input sequence

` `InputIterator

One past the end of the input sequence

` `Predicate

A predicate for testing the elements of the sequence

`

returns false on an empty range

true if any of the elements in [first, last) satisfy the predicate

BOOST_CXX14_CONSTEXPR bool `const Range &

The input range

` `Predicate

A predicate for testing the elements of the range

`

returns false on an empty range

true if any elements in the range satisfy the predicate 'p'

BOOST_CXX14_CONSTEXPR bool `InputIterator

The start of the input sequence

` `InputIterator

One past the end of the input sequence

` `const V &

A value to compare against

`

returns false on an empty range

true if any of the elements in [first, last) are equal to 'val'

BOOST_CXX14_CONSTEXPR bool `const Range &

The input range

` `const V &

A value to compare against

`

returns false on an empty range

true if any of the elements in the range are equal to 'val'

Copy a subset of a sequence to a new sequence.

Marshall Clow

BOOST_CXX14_CONSTEXPR OutputIterator `InputIterator

The start of the input sequence

` `InputIterator

One past the end of the input sequence

` `OutputIterator

An output iterator to write the results into

` `Predicate

A predicate for testing the elements of the range

` Copies all the elements from the input range that satisfy the predicate to the output range.

This function is part of the C++2011 standard library.

The updated output iterator

BOOST_CXX14_CONSTEXPR OutputIterator `const Range &

The input range

` `OutputIterator

An output iterator to write the results into

` `Predicate

A predicate for testing the elements of the range

` Copies all the elements from the input range that satisfy the predicate to the output range.

The updated output iterator

BOOST_CXX14_CONSTEXPR std::pair< InputIterator, OutputIterator > `InputIterator

The start of the input sequence

` `InputIterator

One past the end of the input sequence

` `OutputIterator

An output iterator to write the results into

` `Predicate

A predicate for testing the elements of the range

` Copies all the elements at the start of the input range that satisfy the predicate to the output range.

The updated input and output iterators

BOOST_CXX14_CONSTEXPR std::pair< typename boost::range_iterator< const Range >::type, OutputIterator > `const Range &

The input range

` `OutputIterator

An output iterator to write the results into

` `Predicate

A predicate for testing the elements of the range

` Copies all the elements at the start of the input range that satisfy the predicate to the output range.

The updated input and output iterators

BOOST_CXX14_CONSTEXPR std::pair< InputIterator, OutputIterator > `InputIterator

The start of the input sequence

` `InputIterator

One past the end of the input sequence

` `OutputIterator

An output iterator to write the results into

` `Predicate

A predicate for testing the elements of the range

` Copies all the elements at the start of the input range that do not satisfy the predicate to the output range.

The updated output iterator

BOOST_CXX14_CONSTEXPR std::pair< typename boost::range_iterator< const Range >::type, OutputIterator > `const Range &

The input range

` `OutputIterator

An output iterator to write the results into

` `Predicate

A predicate for testing the elements of the range

` Copies all the elements at the start of the input range that do not satisfy the predicate to the output range.

The updated output iterator

BOOST_CXX14_CONSTEXPR std::pair< InputIterator, OutputIterator > `InputIterator

The start of the input sequence

` `InputIterator

One past the end of the input sequence

` `OutputIterator

An output iterator to write the results into

` `CopyPredicate

A predicate for testing whether to the current element

` `TerminatePred

A predicate for testing whether to end the copy operation

` Copies all the elements from the input range that satisfy the copy predicate to the output range while the termination predicate is satisfied.

The updated output iterator

BOOST_CXX14_CONSTEXPR std::pair< typename boost::range_iterator< const Range >::type, OutputIterator > `const Range &

The input range

` `OutputIterator

An output iterator to write the results into

` `CopyPredicate

A predicate for testing whether to the current element

` `TerminatePred

A predicate for testing whether to end the copy operation

` Copies all the elements from the input range that satisfy the copy predicate to the output range while the termination predicate is satisfied.

The updated output iterator

BOOST_CXX14_CONSTEXPR std::pair< InputIterator, OutputIterator > `InputIterator

The start of the input sequence

` `InputIterator

One past the end of the input sequence

` `OutputIterator

An output iterator to write the results into

` `CopyPredicate

A predicate for testing whether to the current element

` `TerminatePred

A predicate for testing whether to end the copy operation

` Copies all the elements from the input range that satisfy the copy predicate to the output range until the termination predicate is satisfied.

The updated output iterator

BOOST_CXX14_CONSTEXPR std::pair< typename boost::range_iterator< const Range >::type, OutputIterator > `const Range &

The input range

` `OutputIterator

An output iterator to write the results into

` `CopyPredicate

A predicate for testing whether to the current element

` `TerminatePred

A predicate for testing whether to end the copy operation

` Copies all the elements from the input range that satisfy the copy predicate to the output range until the termination predicate is satisfied.

The updated output iterator

Copy n items from one sequence to another.

Marshall Clow

BOOST_CXX14_CONSTEXPR OutputIterator `InputIterator

The start of the input sequence

` `Size

The number of elements to copy

` `OutputIterator

An output iterator to write the results into

` Copies exactly n (n > 0) elements from the range starting at first to the range starting at result.

This function is part of the C++2011 standard library.

The updated output iterator

Find the first element in a sequence that does not satisfy a predicate.

Marshall Clow

BOOST_CXX14_CONSTEXPR InputIterator `InputIterator

The start of the input sequence

` `InputIterator

One past the end of the input sequence

` `Predicate

A predicate for testing the elements of the range

` Finds the first element in the sequence that does not satisfy the predicate.

This function is part of the C++2011 standard library.

The iterator pointing to the desired element.

BOOST_CXX14_CONSTEXPR boost::range_iterator< constRange >::type `const Range &

The input range

` `Predicate

A predicate for testing the elements of the range

` Finds the first element in the sequence that does not satisfy the predicate.

The iterator pointing to the desired element.

Generate an increasing series.

Marshall Clow

BOOST_CXX14_CONSTEXPR void `ForwardIterator

The start of the input sequence

` `ForwardIterator

One past the end of the input sequence

` `T

The initial value of the sequence to be generated

` Generates an increasing sequence of values, and stores them in [first, last)

This function is part of the C++2011 standard library.

BOOST_CXX14_CONSTEXPR void `Range &

The input range

` `T

The initial value of the sequence to be generated

` Generates an increasing sequence of values, and stores them in the input Range.

BOOST_CXX14_CONSTEXPR OutputIterator `OutputIterator

An output iterator to write the results into

` `T

The initial value of the sequence to be generated

` `std::size_t

The number of items to write

` Generates an increasing sequence of values, and stores them in the input Range.

Tell if a sequence is partitioned.

Marshall Clow

BOOST_CXX14_CONSTEXPR bool `InputIterator

The start of the input sequence

` `InputIterator

One past the end of the input sequence

` `UnaryPredicate

The predicate to test the values with

` Tests to see if a sequence is partitioned according to a predicate. In other words, all the items in the sequence that satisfy the predicate are at the beginning of the sequence.

This function is part of the C++2011 standard library.

BOOST_CXX14_CONSTEXPR bool `const Range &

The input range

` `UnaryPredicate

The predicate to test the values with

` Tests to see if a sequence is partitioned according to a predicate. In other words, all the items in the sequence that satisfy the predicate are at the beginning of the sequence.

Is a sequence a permutation of another sequence.

Marshall Clow

bool `ForwardIterator1

The start of the input sequence

` `ForwardIterator1

One past the end of the input sequence

` `ForwardIterator2

The start of the second sequence

` `BinaryPredicate

The predicate to compare elements with

` Tests to see if the sequence [first,last) is a permutation of the sequence starting at first2.

This function is part of the C++2011 standard library.

bool `ForwardIterator1

The start of the input sequence

` `ForwardIterator1` `ForwardIterator2

The start of the second sequence

` Tests to see if the sequence [first,last) is a permutation of the sequence starting at first2.

This function is part of the C++2011 standard library.

bool `const Range &

The input range

` `ForwardIterator

The start of the second sequence

` Tests to see if the sequence [first,last) is a permutation of the sequence starting at first2.

boost::disable_if_c< boost::is_same< Range, ForwardIterator >::value, bool >::type `const Range &

The input range

` `ForwardIterator

The start of the second sequence

` `BinaryPredicate

The predicate to compare elements with

` Tests to see if the sequence [first,last) is a permutation of the sequence starting at first2.

Is a sequence a permutation of another sequence (four iterator versions)

Marshall Clow

bool `ForwardIterator1

The start of the input sequence

` `ForwardIterator1

One past the end of the second sequence

` `ForwardIterator2

The start of the second sequence

` `ForwardIterator2

One past the end of the input sequence

` Tests to see if the sequence [first,last) is a permutation of the sequence starting at first2.

This function is part of the C++2014 standard library.

bool `ForwardIterator1

The start of the input sequence

` `ForwardIterator1

One past the end of the input sequence

` `ForwardIterator2

The start of the second sequence

` `ForwardIterator2

One past the end of the second sequence

` `BinaryPredicate

The predicate to compare elements with

` Tests to see if the sequence [first,last) is a permutation of the sequence starting at first2.

This function is part of the C++2014 standard library.

BOOST_CXX14_CONSTEXPR ForwardIterator `ForwardIterator

The start of the sequence to be tested.

` `ForwardIterator

One past the end of the sequence

` `Pred

A binary predicate that returns true if two elements are ordered.

`

the point in the sequence [first, last) where the elements are unordered (according to the comparison predicate 'p').

BOOST_CXX14_CONSTEXPR ForwardIterator `ForwardIterator

The start of the sequence to be tested.

` `ForwardIterator

One past the end of the sequence

`

the point in the sequence [first, last) where the elements are unordered

BOOST_CXX14_CONSTEXPR bool `ForwardIterator

The start of the sequence to be tested.

` `ForwardIterator

One past the end of the sequence

` `Pred

A binary predicate that returns true if two elements are ordered.

`

whether or not the entire sequence is sorted

BOOST_CXX14_CONSTEXPR bool `ForwardIterator

The start of the sequence to be tested.

` `ForwardIterator

One past the end of the sequence

`

whether or not the entire sequence is sorted

BOOST_CXX14_CONSTEXPR boost::lazy_disable_if_c< boost::is_same< R, Pred >::value, typenameboost::range_iterator< constR > >::type `const R &

The range to be tested.

` `Pred

A binary predicate that returns true if two elements are ordered.

`

– Range based versions of the C++11 functions

the point in the range R where the elements are unordered (according to the comparison predicate 'p').

BOOST_CXX14_CONSTEXPR boost::range_iterator< constR >::type `const R &

The range to be tested.

`

the point in the range R where the elements are unordered

BOOST_CXX14_CONSTEXPR boost::lazy_disable_if_c< boost::is_same< R, Pred >::value, boost::type_identity< bool > >::type `const R &

The range to be tested.

` `Pred

A binary predicate that returns true if two elements are ordered.

`

whether or not the entire range R is sorted (according to the comparison predicate 'p').

BOOST_CXX14_CONSTEXPR bool `const R &

The range to be tested.

`

whether or not the entire range R is sorted

BOOST_CXX14_CONSTEXPR bool `ForwardIterator

The start of the sequence to be tested.

` `ForwardIterator

One past the end of the sequence

`

– Range based versions of the C++11 functions

This function will return true for sequences that contain items that compare equal. If that is not what you intended, you should use is_strictly_increasing instead.

true if the entire sequence is increasing; i.e, each item is greater than or equal to the previous one.

BOOST_CXX14_CONSTEXPR bool `const R &

The range to be tested.

`

This function will return true for sequences that contain items that compare equal. If that is not what you intended, you should use is_strictly_increasing instead.

true if the entire sequence is increasing; i.e, each item is greater than or equal to the previous one.

BOOST_CXX14_CONSTEXPR bool `ForwardIterator

The start of the sequence to be tested.

` `ForwardIterator

One past the end of the sequence

`

This function will return true for sequences that contain items that compare equal. If that is not what you intended, you should use is_strictly_decreasing instead.

true if the entire sequence is decreasing; i.e, each item is less than or equal to the previous one.

BOOST_CXX14_CONSTEXPR bool `const R &

The range to be tested.

`

This function will return true for sequences that contain items that compare equal. If that is not what you intended, you should use is_strictly_decreasing instead.

true if the entire sequence is decreasing; i.e, each item is less than or equal to the previous one.

BOOST_CXX14_CONSTEXPR bool `ForwardIterator

The start of the sequence to be tested.

` `ForwardIterator

One past the end of the sequence

`

This function will return false for sequences that contain items that compare equal. If that is not what you intended, you should use is_increasing instead.

true if the entire sequence is strictly increasing; i.e, each item is greater than the previous one

BOOST_CXX14_CONSTEXPR bool `const R &

The range to be tested.

`

This function will return false for sequences that contain items that compare equal. If that is not what you intended, you should use is_increasing instead.

true if the entire sequence is strictly increasing; i.e, each item is greater than the previous one

BOOST_CXX14_CONSTEXPR bool `ForwardIterator

The start of the sequence to be tested.

` `ForwardIterator

One past the end of the sequence

`

This function will return false for sequences that contain items that compare equal. If that is not what you intended, you should use is_decreasing instead.

true if the entire sequence is strictly decreasing; i.e, each item is less than the previous one

BOOST_CXX14_CONSTEXPR bool `const R &

The range to be tested.

`

This function will return false for sequences that contain items that compare equal. If that is not what you intended, you should use is_decreasing instead.

true if the entire sequence is strictly decreasing; i.e, each item is less than the previous one

Test ranges to see if no elements match a value or predicate.

Marshall Clow

BOOST_CXX14_CONSTEXPR bool `InputIterator

The start of the input sequence

` `InputIterator

One past the end of the input sequence

` `Predicate

A predicate for testing the elements of the sequence

`

returns true on an empty range

true if none of the elements in [first, last) satisfy the predicate 'p'

BOOST_CXX14_CONSTEXPR bool `const Range &

The input range

` `Predicate

A predicate for testing the elements of the range

`

returns true on an empty range

true if none of the elements in the range satisfy the predicate 'p'

BOOST_CXX14_CONSTEXPR bool `InputIterator

The start of the input sequence

` `InputIterator

One past the end of the input sequence

` `const V &

A value to compare against

`

returns true on an empty range

true if none of the elements in [first, last) are equal to 'val'

BOOST_CXX14_CONSTEXPR bool `const Range &

The input range

` `const V &

A value to compare against

`

returns true on an empty range

true if none of the elements in the range are equal to 'val'

Test ranges to see if only one element matches a value or predicate.

Marshall Clow

BOOST_CXX14_CONSTEXPR bool `InputIterator

The start of the input sequence

` `InputIterator

One past the end of the input sequence

` `Predicate

A predicate for testing the elements of the sequence

`

true if the predicate 'p' is true for exactly one item in [first, last).

BOOST_CXX14_CONSTEXPR bool `const Range &

The input range

` `Predicate

A predicate for testing the elements of the range

`

true if the predicate 'p' is true for exactly one item in the range.

BOOST_CXX14_CONSTEXPR bool `InputIterator

The start of the input sequence

` `InputIterator

One past the end of the input sequence

` `const V &

A value to compare against

`

true if the value 'val' exists only once in [first, last).

BOOST_CXX14_CONSTEXPR bool `const Range &

The input range

` `const V &

A value to compare against

`

true if the value 'val' exists only once in the range.

Copy a subset of a sequence to a new sequence.

Marshall Clow

BOOST_CXX14_CONSTEXPR std::pair< OutputIterator1, OutputIterator2 > `InputIterator

The start of the input sequence

` `InputIterator

One past the end of the input sequence

` `OutputIterator1

An output iterator to write the elements that satisfy the predicate into

` `OutputIterator2

An output iterator to write the elements that do not satisfy the predicate into

` `UnaryPredicate

A predicate for dividing the elements of the input sequence.

` Copies the elements that satisfy the predicate p from the range [first, last) to the range beginning at d_first_true, and copies the elements that do not satisfy p to the range beginning at d_first_false.

This function is part of the C++2011 standard library.

BOOST_CXX14_CONSTEXPR std::pair< OutputIterator1, OutputIterator2 > `const Range &

The input range

` `OutputIterator1

An output iterator to write the elements that satisfy the predicate into

` `OutputIterator2

An output iterator to write the elements that do not satisfy the predicate into

` `UnaryPredicate

A predicate for dividing the elements of the input sequence.

`

Find the partition point in a sequence.

Marshall Clow

ForwardIterator `ForwardIterator

The start of the input sequence

` `ForwardIterator

One past the end of the input sequence

` `Predicate

The predicate to test the values with

` Given a partitioned range, returns the partition point, i.e, the first element that does not satisfy p.

This function is part of the C++2011 standard library.

boost::range_iterator< Range >::type `Range &

The input range

` `Predicate

The predicate to test the values with

` Given a partitioned range, returns the partition point.

Test ranges to if they are equal.

Marshall Clow

BOOST_CXX14_CONSTEXPR bool `InputIterator1

The start of the first range.

` `InputIterator1

One past the end of the first range.

` `InputIterator2

The start of the second range.

` `InputIterator2

One past the end of the second range.

` `BinaryPredicate

A predicate for comparing the elements of the ranges

`

true if all elements in the two ranges are equal

BOOST_CXX14_CONSTEXPR bool `InputIterator1

The start of the first range.

` `InputIterator1

One past the end of the first range.

` `InputIterator2

The start of the second range.

` `InputIterator2

One past the end of the second range.

`

true if all elements in the two ranges are equal

Find the first mismatched element in a sequence.

Marshall Clow

BOOST_CXX14_CONSTEXPR std::pair< InputIterator1, InputIterator2 > `InputIterator1

The start of the first range.

` `InputIterator1

One past the end of the first range.

` `InputIterator2

The start of the second range.

` `InputIterator2

One past the end of the second range.

` `BinaryPredicate

A predicate for comparing the elements of the ranges

`

a pair of iterators pointing to the first elements in the sequence that do not match

BOOST_CXX14_CONSTEXPR std::pair< InputIterator1, InputIterator2 > `InputIterator1

The start of the first range.

` `InputIterator1

One past the end of the first range.

` `InputIterator2

The start of the second range.

` `InputIterator2

One past the end of the second range.

`

a pair of iterators pointing to the first elements in the sequence that do not match

???

Marshall Clow

OutputIterator `InputIterator` `InputIterator` `OutputIterator` `T` `BinaryOperation`
OutputIterator `InputIterator` `InputIterator` `OutputIterator` `T`

Apply a functor to the elements of a sequence.

Marshall Clow

InputIterator `InputIterator

The start of the first range.

` `Size

One past the end of the first range.

` `Function

A functor to apply to the elements of the sequence

`

If f returns a result, the result is ignored.

first + n

OutputIterator `InputIterator` `InputIterator` `OutputIterator` `BinaryOperation` `T`
OutputIterator `InputIterator` `InputIterator` `OutputIterator` `BinaryOperation`
OutputIterator `InputIterator` `InputIterator` `OutputIterator`

Combine the elements of a sequence into a single value.

Marshall Clow

T `InputIterator` `InputIterator` `T` `BinaryOperation`
T `InputIterator` `InputIterator` `T`
std::iterator_traits< InputIterator >::value_type `InputIterator` `InputIterator`
boost::range_value< Range >::type `const Range &`
T `const Range &` `T`
T `const Range &` `T` `BinaryOperation`

????

Marshall Clow

OutputIterator `InputIterator` `InputIterator` `OutputIterator` `T` `BinaryOperation` `UnaryOperation`
OutputIterator `InputIterator

The start of the input sequence

The start of the input sequence

` `InputIterator

The end of the input sequence

The end of the input sequence

` `OutputIterator

The output iterator to write the results into

The output iterator to write the results into

` `BinaryOperation

The operation for combining transformed input elements

The operation for combining transformed input elements

` `UnaryOperation

The operation for transforming input elements

The operation for transforming input elements

` `T

The initial value

` Transforms elements from the input range with uOp and then combines those transformed elements with bOp such that the n-1th element and the nth element are combined. Inclusivity means that the nth element is included in the nth combination.

Transforms elements from the input range with uOp and then combines those transformed elements with bOp such that the n-1th element and the nth element are combined. Inclusivity means that the nth element is included in the nth combination. The first value will be used as the init.

This function is part of the C++17 standard library

This function is part of the C++17 standard library

The updated output iterator

The updated output iterator

OutputIterator `InputIterator` `InputIterator` `OutputIterator` `BinaryOperation` `UnaryOperation`

Combine the (transformed) elements of a sequence (or two) into a single value.

Marshall Clow

T `InputIterator1` `InputIterator1` `InputIterator2` `T` `BinaryOperation1` `BinaryOperation2`
T `InputIterator` `InputIterator` `T` `BinaryOperation` `UnaryOperation`
T `InputIterator1` `InputIterator1` `InputIterator2` `T`
BOOST_CXX14_CONSTEXPR BidiIter `BidiIter` `BidiIter` `const T &`
BOOST_CXX14_CONSTEXPR boost::range_iterator< Range >::type `Range &` `const T &`
BOOST_CXX14_CONSTEXPR BidiIter `BidiIter` `BidiIter` `const T &`
BOOST_CXX14_CONSTEXPR boost::range_iterator< Range >::type `Range &` `const T &`
BOOST_CXX14_CONSTEXPR BidiIter `BidiIter` `BidiIter` `Pred`
BOOST_CXX14_CONSTEXPR boost::range_iterator< Range >::type `Range &` `Pred`
BOOST_CXX14_CONSTEXPR BidiIter `BidiIter` `BidiIter` `Pred`
BOOST_CXX14_CONSTEXPR boost::range_iterator< Range >::type `Range &` `Pred`
BOOST_CXX14_CONSTEXPR InputIter `InputIter` `Sentinel` `const T &`
BOOST_CXX14_CONSTEXPR boost::range_iterator< Range >::type `Range &` `const T &`
std::pair< BidirectionalIterator, BidirectionalIterator > `BidirectionalIterator` `BidirectionalIterator` `BidirectionalIterator` `Pred` iterator-based gather implementation
std::pair< typename boost::range_iterator< BidirectionalRange >::type, typename boost::range_iterator< BidirectionalRange >::type > `BidirectionalRange &` `typename boost::range_iterator< BidirectionalRange >::type` `Pred` range-based gather implementation

Convert sequence of integral types into a sequence of hexadecimal characters and back. Based on the MySQL functions HEX and UNHEX.

Marshall Clow

boost::exception
std::exception
Base exception class for all hex decoding errors.
boost::algorithm::hex_decode_error
Thrown when a non-hex value (0-9, A-F) encountered when decoding. Contains the offending character.
boost::algorithm::hex_decode_error
Thrown when the input sequence unexpectedly ends.
boost::error_info< struct bad_char_, char >
unspecified `InputIterator

The start of the input sequence

` `InputIterator

One past the end of the input sequence

` `OutputIterator

An output iterator to the results into

` Converts a sequence of integral types into a hexadecimal sequence of characters.

Based on the MySQL function of the same name

The updated output iterator

unspecified `InputIterator

The start of the input sequence

` `InputIterator

One past the end of the input sequence

` `OutputIterator

An output iterator to the results into

` Converts a sequence of integral types into a lower case hexadecimal sequence of characters.

Based on the MySQL function of the same name

The updated output iterator

boost::enable_if< boost::is_integral< T >, OutputIterator >::type `const T *

A pointer to a 0-terminated sequence of data.

` `OutputIterator

An output iterator to the results into

` Converts a sequence of integral types into a hexadecimal sequence of characters.

Based on the MySQL function of the same name

The updated output iterator

boost::enable_if< boost::is_integral< T >, OutputIterator >::type `const T *

A pointer to a 0-terminated sequence of data.

` `OutputIterator

An output iterator to the results into

` Converts a sequence of integral types into a lower case hexadecimal sequence of characters.

Based on the MySQL function of the same name

The updated output iterator

unspecified `const Range &

The input range

` `OutputIterator

An output iterator to the results into

` Converts a sequence of integral types into a hexadecimal sequence of characters.

Based on the MySQL function of the same name

The updated output iterator

unspecified `const Range &

The input range

` `OutputIterator

An output iterator to the results into

` Converts a sequence of integral types into a lower case hexadecimal sequence of characters.

Based on the MySQL function of the same name

The updated output iterator

OutputIterator `InputIterator

The start of the input sequence

` `InputIterator

One past the end of the input sequence

` `OutputIterator

An output iterator to the results into

` Converts a sequence of hexadecimal characters into a sequence of integers.

Based on the MySQL function of the same name

The updated output iterator

OutputIterator `const T *

A pointer to a null-terminated input sequence.

` `OutputIterator

An output iterator to the results into

` Converts a sequence of hexadecimal characters into a sequence of integers.

Based on the MySQL function of the same name

The updated output iterator

OutputIterator `const Range &

The input range

` `OutputIterator

An output iterator to the results into

` Converts a sequence of hexadecimal characters into a sequence of integers.

Based on the MySQL function of the same name

The updated output iterator

String `const String &

A container to be converted

` Converts a sequence of integral types into a hexadecimal sequence of characters.

A container with the encoded text

String `const String &

A container to be converted

` Converts a sequence of integral types into a lower case hexadecimal sequence of characters.

A container with the encoded text

String `const String &

A container to be converted

` Converts a sequence of hexadecimal characters into a sequence of characters.

A container with the decoded text

IsClamped algorithm.

Ivan Matek, Marshall Clow

BOOST_CXX14_CONSTEXPR bool `T const &

The value to be checked

` `typename boost::type_identity< T >::type const &

The lower bound of the range

` `typename boost::type_identity< T >::type const &

The upper bound of the range

` `Pred

A predicate to use to compare the values. p ( a, b ) returns a boolean.

`

true if value "val" is in the range [ lo, hi ] using the comparison predicate p. If p ( val, lo ) return false. If p ( hi, val ) return false. Otherwise, returns true.

BOOST_CXX14_CONSTEXPR bool `const T &

The value to be checked

` `typename boost::type_identity< T >::type const &

The lower bound of the range

` `typename boost::type_identity< T >::type const &

The upper bound of the range

`

true if value "val" is in the range [ lo, hi ] using operator < for comparison. If the value is less than lo, return false. If the value is greater than hi, return false. Otherwise, returns true.

Checks the input sequence on palindrome.

Alexander Zaitsev

bool `BidirectionalIterator

The start of the input sequence

` `BidirectionalIterator

One past the end of the input sequence

` `Predicate

A predicate used to compare the values.

`

This function will return true for empty sequences and for palindromes. For other sequences function will return false. Complexity: O(N).

true if the entire sequence is palindrome

bool `BidirectionalIterator

The start of the input sequence

` `BidirectionalIterator

One past the end of the input sequence

`

This function will return true for empty sequences and for palindromes. For other sequences function will return false. Complexity: O(N).

true if the entire sequence is palindrome

bool `const R &

The range to be tested.

`

This function will return true for empty sequences and for palindromes. For other sequences function will return false. Complexity: O(N).

true if the entire sequence is palindrome

bool `const R &

The range to be tested.

` `Predicate

A predicate used to compare the values.

`

This function will return true for empty sequences and for palindromes. For other sequences function will return false. Complexity: O(N).

true if the entire sequence is palindrome

bool `const char *

C-string to be tested.

`

This function will return true for empty sequences and for palindromes. For other sequences function will return false. Complexity: O(N).

true if the entire sequence is palindrome

bool `const char *

C-string to be tested.

` `Predicate

A predicate used to compare the values.

`

This function will return true for empty sequences and for palindromes. For other sequences function will return false. Complexity: O(N).

true if the entire sequence is palindrome

Tell if a sequence is partitioned.

Alexander Zaitsev

InputIterator `InputIterator

The start of the input sequence

` `InputIterator

One past the end of the input sequence

` `UnaryPredicate

The predicate to test the values with

` Tests to see if a sequence is partitioned according to a predicate. In other words, all the items in the sequence that satisfy the predicate are at the beginning of the sequence.

Returns the first iterator 'it' in the sequence [first, last) for which is_partitioned(first, it, p) is false. Returns last if the entire sequence is partitioned. Complexity: O(N).

boost::range_iterator< constRange >::type `const Range &

The input range

` `UnaryPredicate

The predicate to test the values with

` Tests to see if a sequence is partitioned according to a predicate. In other words, all the items in the sequence that satisfy the predicate are at the beginning of the sequence.

Returns the first iterator 'it' in the sequence [first, last) for which is_partitioned(first, it, p) is false. Returns last if the entire sequence is partitioned. Complexity: O(N).

tuple< T const &, T const & > `T const &` `T const &`
tuple< T const &, T const & > `T const &` `T const &` `BinaryPredicate`
std::pair< ForwardIter, ForwardIter > `ForwardIter` `ForwardIter`
std::pair< ForwardIter, ForwardIter > `ForwardIter` `ForwardIter` `BinaryPredicate`
ForwardIter `ForwardIter` `ForwardIter`
ForwardIter `ForwardIter` `ForwardIter` `BinaryPredicate`
ForwardIter `ForwardIter` `ForwardIter`
ForwardIter `ForwardIter` `ForwardIter` `BinaryPredicate`
ForwardIter `ForwardIter` `ForwardIter`
ForwardIter `ForwardIter` `ForwardIter` `BinaryPredicate`
ForwardIter `ForwardIter` `ForwardIter`
ForwardIter `ForwardIter` `ForwardIter` `BinaryPredicate`
std::pair< ForwardIter, ForwardIter > `ForwardIter` `ForwardIter`
std::pair< ForwardIter, ForwardIter > `ForwardIter` `ForwardIter` `BinaryPredicate`
std::pair< ForwardIter, ForwardIter > `ForwardIter` `ForwardIter`
std::pair< ForwardIter, ForwardIter > `ForwardIter` `ForwardIter` `BinaryPredicate`
std::pair< ForwardIter, ForwardIter > `ForwardIter` `ForwardIter`
std::pair< ForwardIter, ForwardIter > `ForwardIter` `ForwardIter` `BinaryPredicate`
std::pair< ForwardIter, ForwardIter > `ForwardIter` `ForwardIter`
std::pair< ForwardIter, ForwardIter > `ForwardIter` `ForwardIter` `BinaryPredicate`
detail::BM_traits<patIter>
std::pair< corpusIter, corpusIter > `corpusIter` `corpusIter`
std::pair< typename boost::range_iterator< Range >::type, typename boost::range_iterator< Range >::type > `Range &`
patIter
patIter
std::pair< corpusIter, corpusIter > `corpusIter

The start of the data to search (Random Access Iterator)

` `corpusIter

One past the end of the data to search

` `patIter

The start of the pattern to search for (Random Access Iterator)

` `patIter

One past the end of the data to search for

` Searches the corpus for the pattern.

std::pair< corpusIter, corpusIter > `corpusIter` `corpusIter` `const PatternRange &`
boost::disable_if_c< boost::is_same< CorpusRange, patIter >::value, std::pair< typenameboost::range_iterator< CorpusRange >::type, typenameboost::range_iterator< CorpusRange >::type > >::type `CorpusRange &` `patIter` `patIter`
std::pair< typename boost::range_iterator< CorpusRange >::type, typename boost::range_iterator< CorpusRange >::type > `CorpusRange &` `const PatternRange &`
`boost::algorithm::boyer_moore`< typename boost::range_iterator< const Range >::type > `const Range &`
`boost::algorithm::boyer_moore`< typename boost::range_iterator< Range >::type > `Range &`
detail::BM_traits<patIter>
std::pair< corpusIter, corpusIter > `corpusIter` `corpusIter`
std::pair< typename boost::range_iterator< Range >::type, typename boost::range_iterator< Range >::type > `Range &`
patIter
patIter
std::pair< corpusIter, corpusIter > `corpusIter

The start of the data to search (Random Access Iterator)

` `corpusIter

One past the end of the data to search

` `patIter

The start of the pattern to search for (Random Access Iterator)

` `patIter

One past the end of the data to search for

` Searches the corpus for the pattern.

std::pair< corpusIter, corpusIter > `corpusIter` `corpusIter` `const PatternRange &`
boost::disable_if_c< boost::is_same< CorpusRange, patIter >::value, std::pair< typenameboost::range_iterator< CorpusRange >::type, typenameboost::range_iterator< CorpusRange >::type > >::type `CorpusRange &` `patIter` `patIter`
std::pair< typename boost::range_iterator< CorpusRange >::type, typename boost::range_iterator< CorpusRange >::type > `CorpusRange &` `const PatternRange &`
`boost::algorithm::boyer_moore_horspool`< typename boost::range_iterator< const Range >::type > `const Range &`
`boost::algorithm::boyer_moore_horspool`< typename boost::range_iterator< Range >::type > `Range &`
std::pair< corpusIter, corpusIter > `corpusIter` `corpusIter`
std::pair< typename boost::range_iterator< Range >::type, typename boost::range_iterator< Range >::type > `Range &`
patIter
patIter
std::pair< corpusIter, corpusIter > `corpusIter

The start of the data to search (Random Access Iterator)

` `corpusIter

One past the end of the data to search

` `patIter

The start of the pattern to search for (Random Access Iterator)

` `patIter

One past the end of the data to search for

` Searches the corpus for the pattern.

std::pair< corpusIter, corpusIter > `corpusIter` `corpusIter` `const PatternRange &`
boost::disable_if_c< boost::is_same< CorpusRange, patIter >::value, std::pair< typenameboost::range_iterator< CorpusRange >::type, typenameboost::range_iterator< CorpusRange >::type > >::type `CorpusRange &` `patIter` `patIter`
std::pair< typename boost::range_iterator< CorpusRange >::type, typename boost::range_iterator< CorpusRange >::type > `CorpusRange &` `const PatternRange &`
`boost::algorithm::knuth_morris_pratt`< typename boost::range_iterator< const Range >::type > `const Range &`
`boost::algorithm::knuth_morris_pratt`< typename boost::range_iterator< Range >::type > `Range &`

Sort a subrange.

Marshall Clow

Suggested by Sean Parent in his CppCon 2015 keynote `void `Iterator``Iterator``Iterator``Iterator``Pred`` `void `Iterator``Iterator``Iterator``Iterator`` `void `Iterator``Iterator``Iterator``Iterator``Pred`` `void `Iterator``Iterator``Iterator``Iterator``

Cumulative include for string_algo library

Cumulative include for string_algo library. In addition to string.hpp contains also regex-related stuff.