33 return a.is_equal_to(
b);
37 virtual bool is_equal_to(
const Key &other)
const = 0;
51 void add(std::unique_ptr<Key> key, std::unique_ptr<Value> value);
54 FunctionRef<std::unique_ptr<Value>()> create_value);
61 return dynamic_cast<T &
>(
62 this->
lookup_or_add(std::move(key), []() {
return std::make_unique<T>(); }));
friend bool operator==(const Key &a, const Key &b)
virtual uint64_t hash() const =0
T & lookup_or_add(std::unique_ptr< Key > key)
Value * lookup(const Key &key)
void add(std::unique_ptr< Key > key, std::unique_ptr< Value > value)
Value & lookup_or_add(std::unique_ptr< Key > key, FunctionRef< std::unique_ptr< Value >()> create_value)
local_group_size(16, 16) .push_constant(Type b
unsigned __int64 uint64_t