diff --git a/README.md b/README.md index f2b8ef7..9088bb3 100644 --- a/README.md +++ b/README.md @@ -20,4 +20,23 @@ auto generate_random() -> T ```cpp template class T hash_t +{ + hash_t hash(const T& data, std::size_t hash_result) + : data {&data}, hash_result{hash_result} + {} + + std::size_t hash_result; + const T* data; + + public: + static std::shared_ptr make(const T& data) + { + auto hash = std::hash>{}(data, llo::utils::generate_random()); + + return std::make_shared(data, hash); + } + + T& get_data() const; + std::size_t get_hash() const; +}; ```