# HG changeset patch # User David Anderson # Date 1377332983 25200 # Node ID b52cc94632fd14eac559ec5954d8c902aff67354 # Parent ebff56b332b2414249bfd9a92defe688f3a733e3 Fix build problems when using HashMap. diff -r ebff56b332b2 -r b52cc94632fd public/amtl/am-hashmap.h --- a/public/amtl/am-hashmap.h Sat Aug 24 01:29:26 2013 -0700 +++ b/public/amtl/am-hashmap.h Sat Aug 24 01:29:43 2013 -0700 @@ -57,6 +57,10 @@ K key; V value; + Entry() + { + } + Entry(const K &aKey, const V &aValue) : key(aKey), value(aValue) @@ -120,6 +124,13 @@ return table_.add(i, Entry(key, value)); } + // This can be used to avoid compiler constructed temporaries, since AMTL + // does not yet support move semantics. If you use this, the key and value + // must be set after. + bool add(Insert &i) { + return table_.add(i); + } + size_t estimateMemoryUse() const { return table_.estimateMemoryUse(); }