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 // <deque> 11 12 // Test nested types and default template args: 13 14 // template <class T, class Allocator = allocator<T> > 15 // class deque; 16 17 // iterator, const_iterator 18 19 #include <deque> 20 #include <iterator> 21 #include <cassert> 22 23 #include "../../min_allocator.h" 24 main()25int main() 26 { 27 { 28 typedef std::deque<int> C; 29 C c; 30 C::iterator i; 31 i = c.begin(); 32 C::const_iterator j; 33 j = c.cbegin(); 34 assert(i == j); 35 } 36 #if __cplusplus >= 201103L 37 { 38 typedef std::deque<int, min_allocator<int>> C; 39 C c; 40 C::iterator i; 41 i = c.begin(); 42 C::const_iterator j; 43 j = c.cbegin(); 44 assert(i == j); 45 } 46 #endif 47 } 48