swap_ranges swaps each of the elements in the range [first1, first1+N) with the corresponding element in the range [first2, first2 + N). That is, for each integer n such that 0 <= i < N, it swaps *(first1 + i) and *(first2 + i). The return value is first2 + N.
More...
#include </home/runner/work/tfel/tfel/include/TFEL/FSAlgorithm/swap_ranges.hxx>
|
| template<typename ForwardIterator1, typename ForwardIterator2> |
| static TFEL_FSALGORITHM_INLINE ForwardIterator2 | exe (ForwardIterator1 p, ForwardIterator2 q) |
template<unsigned int N>
class tfel::fsalgo::swap_ranges< N >
swap_ranges swaps each of the elements in the range [first1, first1+N) with the corresponding element in the range [first2, first2 + N). That is, for each integer n such that 0 <= i < N, it swaps *(first1 + i) and *(first2 + i). The return value is first2 + N.
- Template Parameters
-
| N | size of the ranges to be swapped. |
This documentation is mostly inspired from: http://www.sgi.com/tech/stl/swap_ranges.html
- Author
- Thomas Helfer
- Date
- 30/06/2006
◆ exe()
template<unsigned int N>
template<typename ForwardIterator1, typename ForwardIterator2>
- Template Parameters
-
| ForwardIterator1 | iterator to the first range |
| ForwardIterator2 | iterator to the second range |
- Parameters
-
| [in] | p | iterator to the first element of the first range |
| [in] | q | iterator to the first element of the second range |
- Returns
- q + N
- Precondition
- ForwardIterator1 and ForwardIterator2 must both be models of Forward Iterator.
- The value types of ForwardIterator1 and ForwardIterator2 must be convertible to each other.
- Author
- Thomas Helfer
- Date
- 30/06/2006
The documentation for this class was generated from the following file: