test/maps_test.cc
changeset 144 4e626dbbe408
parent 123 8899d1891a3c
child 159 c7d30f7810e5
equal deleted inserted replaced
5:8eb163a43315 6:f2f8fc6954a9
    83   // ConstMap
    83   // ConstMap
    84   {
    84   {
    85     checkConcept<ReadWriteMap<A,B>, ConstMap<A,B> >();
    85     checkConcept<ReadWriteMap<A,B>, ConstMap<A,B> >();
    86     checkConcept<ReadWriteMap<A,C>, ConstMap<A,C> >();
    86     checkConcept<ReadWriteMap<A,C>, ConstMap<A,C> >();
    87     ConstMap<A,B> map1;
    87     ConstMap<A,B> map1;
    88     ConstMap<A,B> map2(B());
    88     ConstMap<A,B> map2 = B();
    89     ConstMap<A,B> map3 = map1;
    89     ConstMap<A,B> map3 = map1;
    90     map1 = constMap<A>(B());
    90     map1 = constMap<A>(B());
    91     map1 = constMap<A,B>();
    91     map1 = constMap<A,B>();
    92     map1.setAll(B());
    92     map1.setAll(B());
    93     ConstMap<A,C> map4(C(1));
    93     ConstMap<A,C> map4(C(1));
   141 
   141 
   142   // SparseMap
   142   // SparseMap
   143   {
   143   {
   144     checkConcept<ReferenceMap<A,B,B&,const B&>, SparseMap<A,B> >();
   144     checkConcept<ReferenceMap<A,B,B&,const B&>, SparseMap<A,B> >();
   145     SparseMap<A,B> map1;
   145     SparseMap<A,B> map1;
   146     SparseMap<A,B> map2(B());
   146     SparseMap<A,B> map2 = B();
   147     SparseMap<A,B> map3 = sparseMap<A,B>();
   147     SparseMap<A,B> map3 = sparseMap<A,B>();
   148     SparseMap<A,B> map4 = sparseMap<A>(B());
   148     SparseMap<A,B> map4 = sparseMap<A>(B());
   149 
   149 
   150     checkConcept< ReferenceMap<double, int, int&, const int&>,
   150     checkConcept< ReferenceMap<double, int, int&, const int&>,
   151                   SparseMap<double, int> >();
   151                   SparseMap<double, int> >();