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