Adobe Source Libraries 1.49.0
A collection of C++ libraries.
Loading...
Searching...
No Matches

Functions

template<typename I>
std::pair< I, I > rotate (I f, I m, I l, std::bidirectional_iterator_tag)
template<typename I>
std::pair< I, I > rotate (I f, I m, I l)

Detailed Description

A better algorithm than std::rotate because:

  • It returns both m and m' in the order in which they show up in the sequence, allowing you to derive whether or not m is before or after m'.

Function Documentation

◆ rotate() [1/2]

template<typename I>
std::pair< I, I > rotate ( I f,
I m,
I l,
std::bidirectional_iterator_tag  )

This is the bidirectional optimization for rotate.

Definition at line 39 of file rotate.hpp.

◆ rotate() [2/2]

template<typename I>
std::pair< I, I > rotate ( I f,
I m,
I l )
Parameters
ffirst item in the sequence
mthe midpoint around which the range will be rotated
lone past the last item in the sequence
Returns
m and m' as a pair in the order in which they appear in the range.

Definition at line 64 of file rotate.hpp.