• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // <algorithm>
11 
12 // template<Iterator Iter1, Iterator Iter2>
13 //   requires HasSwap<Iter1::reference, Iter2::reference>
14 //   void
15 //   iter_swap(Iter1 a, Iter2 b);
16 
17 #include <algorithm>
18 #include <cassert>
19 
main()20 int main()
21 {
22     int i = 1;
23     int j = 2;
24     std::iter_swap(&i, &j);
25     assert(i == 2);
26     assert(j == 1);
27 }
28