#include <unordered_set>
#include <utility>
-#include <folly/Hash.h>
#include <folly/Range.h>
#include <folly/experimental/StringKeyedCommon.h>
+#include <folly/hash/Hash.h>
namespace folly {
: private std::unordered_set<StringPiece, Hasher, Eq, Alloc> {
using Base = std::unordered_set<StringPiece, Hasher, Eq, Alloc>;
-public:
+ public:
typedef typename Base::key_type key_type;
typedef typename Base::value_type value_type;
typedef typename Base::hasher hasher;
using Base::cbegin;
using Base::cend;
using Base::find;
+ using Base::count;
- bool operator==(const BasicStringKeyedUnorderedSet& rhs) const {
- const Base& lhs = *this;
+ bool operator==(const BasicStringKeyedUnorderedSet& other) const {
+ Base const& lhs = *this;
+ Base const& rhs = static_cast<Base const&>(other);
return lhs == rhs;
}
using Base::bucket_size;
using Base::bucket;
+ void swap(BasicStringKeyedUnorderedSet& other) & {
+ return Base::swap(other);
+ }
+
~BasicStringKeyedUnorderedSet() {
// Here we assume that unordered_set doesn't use keys in destructor
for (auto& it : *this) {
typedef BasicStringKeyedUnorderedSet<> StringKeyedUnorderedSet;
-} // folly
+} // namespace folly