//===----------------------------------------------------------------------===// // // 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. // //===----------------------------------------------------------------------===// // // move_iterator // Test nested types: // template // class move_iterator { // public: // typedef Iter iterator_type; // typedef Iter::difference_type difference_type; // typedef Iterator pointer; // typedef Iter::value_type value_type; // typedef value_type&& reference; // }; #include #include #include "test_iterators.h" template void test() { typedef std::move_iterator R; typedef std::iterator_traits T; static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES static_assert((std::is_same::value), ""); #else static_assert((std::is_same::value), ""); #endif static_assert((std::is_same::value), ""); } int main() { test >(); test >(); test >(); test >(); test(); }