src/work/klao/map_test.cc
author alpar
Sat, 20 Nov 2004 10:19:06 +0000
changeset 1011 5bd6c7671c9e
parent 618 e944d741f472
permissions -rw-r--r--
- snapshot-rollback functionarity added to ListGraph
- The iterface of the snapshot-rollback functionarity in SmartGraph has
changed to be compatible with ListGraph::SnapShot.
     1 #include <iostream>
     2 
     3 #include <lemon/maps.h>
     4 
     5 using namespace std;
     6 using namespace lemon;
     7 
     8 int main()
     9 {
    10   ConstMap<int, char> a('#');
    11 
    12   cout << "sizeof ConstMap<int,char> = " << sizeof a << endl;
    13   cout << "a[5] = " << a[5] << endl;
    14 
    15   StdMap<int, char> b('$');
    16   cout << "sizeof ConstMap<int,char> = " << sizeof b << endl;
    17   cout << "sizeof std::map<int,char> = "
    18        << sizeof(std::map<int,char>) << endl;
    19   cout << "b[5] = " << b[5] << endl;
    20 
    21   b[5]='l';
    22   cout << "b[5] = " << b[5] << endl;
    23 }