diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-05-08T12·52+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-05-08T12·52+0000 |
commit | 5cabd47394a5bb3076f3f5b5a98425665cddef23 (patch) | |
tree | b334853dc567f3b8c5fc56dcad1321478b6e1722 /src/libutil | |
parent | 310e605995dc104bee29d330ac135e3e2bb82f97 (diff) |
* Allow function argument default values to refer to other arguments
of the function. Implements NIX-45.
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/aterm-map.cc | 6 | ||||
-rw-r--r-- | src/libutil/aterm-map.hh | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/libutil/aterm-map.cc b/src/libutil/aterm-map.cc index 60092382a2f3..f400464378f5 100644 --- a/src/libutil/aterm-map.cc +++ b/src/libutil/aterm-map.cc @@ -217,17 +217,17 @@ unsigned int ATermMap::size() void printATermMapStats() { - cout << "RESIZES: " << nrResizes << " " + cerr << "RESIZES: " << nrResizes << " " << sizeTotalAlloc << " " << sizeCurAlloc << " " << sizeMaxAlloc << endl; - cout << "SET: " + cerr << "SET: " << nrItemsSet << " " << nrSetProbes << " " << (double) nrSetProbes / nrItemsSet << endl; - cout << "GET: " + cerr << "GET: " << nrItemsGet << " " << nrGetProbes << " " << (double) nrGetProbes / nrItemsGet << endl; diff --git a/src/libutil/aterm-map.hh b/src/libutil/aterm-map.hh index 6d13d7f9e0d1..078617a7d673 100644 --- a/src/libutil/aterm-map.hh +++ b/src/libutil/aterm-map.hh @@ -50,6 +50,11 @@ public: ATerm get(ATerm key) const; + ATerm operator [](ATerm key) const + { + return get(key); + } + void remove(ATerm key); unsigned int size(); |