Home | History | Annotate | Download | only in list.cons
      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 // <list>
     11 
     12 // explicit list(const Alloc& = Alloc());
     13 
     14 #include <list>
     15 #include <cassert>
     16 #include "../../../stack_allocator.h"
     17 
     18 #include <iostream>
     19 
     20 int main()
     21 {
     22     {
     23         std::list<int> l;
     24         assert(l.size() == 0);
     25         assert(std::distance(l.begin(), l.end()) == 0);
     26     }
     27     {
     28         std::list<int> l((std::allocator<int>()));
     29         assert(l.size() == 0);
     30         assert(std::distance(l.begin(), l.end()) == 0);
     31     }
     32     {
     33         std::list<int, stack_allocator<int, 4> > l;
     34         assert(l.size() == 0);
     35         assert(std::distance(l.begin(), l.end()) == 0);
     36     }
     37 }
     38