Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/algorithm/iter swap"

From cppreference.com
< cpp‎ | algorithm
(+example)
m (Text replace - "{{return none}}" to "(none)")
Line 17: Line 17:
  
 
===Return value===
 
===Return value===
{{return none}}
+
(none)
  
 
===Complexity===
 
===Complexity===

Revision as of 13:24, 11 October 2011

Template:cpp/algorithm/sidebar Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <algorithm>
</td>

<td></td> <td></td> </tr> <tr class="t-dcl ">

<td class="t-dcl-nopad">
template< class ForwardIterator1, class ForwardIterator2 >
void iter_swap( ForwardIterator1 a, ForwardIterator2 b );
</td>

<td class="t-dcl-nopad"> </td> <td class="t-dcl-nopad"> </td> </tr> Template:ddcl list end

Swaps the values of the elements the given iterators are pointing to.

Contents

Parameters

a, b - iterators to the elements to swap

Return value

(none)

Complexity

constant

Equivalent function

Template:eq fun cpp

Example

Template:example cpp

See also

Template:cpp/algorithm/dcl list swapTemplate:cpp/algorithm/dcl list swap ranges