//===----------------------------------------------------------------------===// // // 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. // //===----------------------------------------------------------------------===// // // Test nested types and default template args: // template // class vector reverse_iterator; // typedef std::reverse_iterator const_reverse_iterator; // }; #include #include #include #include "test_allocator.h" #include "../../Copyable.h" #include "min_allocator.h" template void test() { typedef std::vector C; static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::size_type>::value), ""); static_assert((std::is_same::difference_type>::value), ""); static_assert((std::is_same< typename std::iterator_traits::iterator_category, std::random_access_iterator_tag>::value), ""); static_assert((std::is_same< typename std::iterator_traits::iterator_category, std::random_access_iterator_tag>::value), ""); static_assert((std::is_same< typename C::reverse_iterator, std::reverse_iterator >::value), ""); static_assert((std::is_same< typename C::const_reverse_iterator, std::reverse_iterator >::value), ""); } int main() { test >(); test >(); static_assert((std::is_same::allocator_type, std::allocator >::value), ""); #if __cplusplus >= 201103L test >(); #endif }