bool empty() const { return NumItems == 0; }
unsigned size() const { return NumItems; }
+
+ void swap(StringMapImpl &Other) {
+ std::swap(TheTable, Other.TheTable);
+ std::swap(NumBuckets, Other.NumBuckets);
+ std::swap(NumItems, Other.NumItems);
+ std::swap(NumTombstones, Other.NumTombstones);
+ }
};
/// StringMapEntry - This is used to represent one value that is inserted into
public:
typedef StringMapEntry<ValueTy> value_type;
+ StringMapConstIterator() : Ptr(0) { }
+
explicit StringMapConstIterator(StringMapEntryBase **Bucket,
bool NoAdvance = false)
: Ptr(Bucket) {
template<typename ValueTy>
class StringMapIterator : public StringMapConstIterator<ValueTy> {
public:
+ StringMapIterator() : StringMapConstIterator() {}
explicit StringMapIterator(StringMapEntryBase **Bucket,
bool NoAdvance = false)
: StringMapConstIterator<ValueTy>(Bucket, NoAdvance) {