]> git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/25_algorithms/reverse/moveable.cc
moveable.cc: New.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 25_algorithms / reverse / moveable.cc
1 // { dg-do compile }
2 // { dg-require-rvalref "" }
3 // { dg-options "-std=gnu++0x" }
4
5 // Copyright (C) 2005, 2007 Free Software Foundation, Inc.
6 //
7 // This file is part of the GNU ISO C++ Library. This library is free
8 // software; you can redistribute it and/or modify it under the
9 // terms of the GNU General Public License as published by the
10 // Free Software Foundation; either version 2, or (at your option)
11 // any later version.
12
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
17
18 // You should have received a copy of the GNU General Public License along
19 // with this library; see the file COPYING. If not, write to the Free
20 // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
21 // USA.
22
23 // 25.2.9 Reverse
24
25 #undef _GLIBCXX_CONCEPT_CHECKS
26
27 #include <algorithm>
28 #include <testsuite_iterators.h>
29
30 using __gnu_test::bidirectional_iterator_wrapper;
31
32 class X
33 {
34 X();
35 X(const X&);
36 void operator=(const X&);
37 };
38
39 void
40 swap(X&, X&) { }
41
42 void
43 test1(bidirectional_iterator_wrapper<X>& begin,
44 bidirectional_iterator_wrapper<X>& end)
45 { std::reverse(begin, end); }