8 #include <unordered_set>
10 #include "common/datatypes/Value.h"
15 std::unordered_set<Value> values;
19 Set(
Set&&) noexcept =
default;
20 explicit Set(std::unordered_set<Value> value) {
21 values = std::move(value);
32 std::string toString()
const;
34 Set& operator=(
const Set& rhs) {
42 Set& operator=(
Set&& rhs) noexcept {
46 values = std::move(rhs.values);
50 bool operator==(
const Set& rhs)
const {
51 return values == rhs.values;
54 bool contains(
const Value& value)
const {
55 return values.count(value) != 0;
63 inline std::ostream& operator<<(std::ostream& os,
const Set& s) {
64 return os << s.toString();
71 struct hash<nebula::Set> {
72 std::size_t operator()(
const nebula::Set& s)
const noexcept;