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 // <iterator>
11 
12 // reverse_iterator
13 
14 // template <class U>
15 //   requires HasConstructor<Iter, const U&>
16 //   reverse_iterator(const reverse_iterator<U> &u);
17 
18 // test requires
19 
20 #include <iterator>
21 
22 template <class It, class U>
23 void
test(U u)24 test(U u)
25 {
26     std::reverse_iterator<U> r2(u);
27     std::reverse_iterator<It> r1 = r2;
28 }
29 
30 struct base {};
31 struct derived {};
32 
main()33 int main()
34 {
35     derived d;
36 
37     test<base*>(&d);
38 }
39