Home | History | Annotate | Download | only in multimap
      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 // <map>
     11 
     12 // class multimap
     13 
     14 // bool empty() const;
     15 
     16 #include <map>
     17 #include <cassert>
     18 
     19 #include "min_allocator.h"
     20 
     21 int main()
     22 {
     23     {
     24     typedef std::multimap<int, double> M;
     25     M m;
     26     assert(m.empty());
     27     m.insert(M::value_type(1, 1.5));
     28     assert(!m.empty());
     29     m.clear();
     30     assert(m.empty());
     31     }
     32 #if __cplusplus >= 201103L
     33     {
     34     typedef std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> M;
     35     M m;
     36     assert(m.empty());
     37     m.insert(M::value_type(1, 1.5));
     38     assert(!m.empty());
     39     m.clear();
     40     assert(m.empty());
     41     }
     42 #endif
     43 }
     44