//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // reverse_iterator // template // requires HasConstructor // reverse_iterator(const reverse_iterator &u); #include #include #include "test_iterators.h" template void test(U u) { const std::reverse_iterator r2(u); std::reverse_iterator r1 = r2; assert(r1.base() == u); } struct Base {}; struct Derived : Base {}; int main() { Derived d; test >(bidirectional_iterator(&d)); test >(random_access_iterator(&d)); test(&d); }