//===----------------------------------------------------------------------===// // // 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 deque; // iterator, const_iterator #include #include #include #include "../../min_allocator.h" int main() { { typedef std::deque C; C c; C::iterator i; i = c.begin(); C::const_iterator j; j = c.cbegin(); assert(i == j); } #if __cplusplus >= 201103L { typedef std::deque> C; C c; C::iterator i; i = c.begin(); C::const_iterator j; j = c.cbegin(); assert(i == j); } #endif #if _LIBCPP_STD_VER > 11 { // N3644 testing std::deque::iterator ii1{}, ii2{}; std::deque::iterator ii4 = ii1; std::deque::const_iterator cii{}; assert ( ii1 == ii2 ); assert ( ii1 == ii4 ); assert ( ii1 == cii ); assert ( !(ii1 != ii2 )); assert ( !(ii1 != cii )); // std::deque c; // assert ( ii1 != c.cbegin()); // assert ( cii != c.begin()); // assert ( cii != c.cend()); // assert ( ii1 != c.end()); } #endif }