#include "string.h" #include "vector.h" #include "strbuf.h" #include #include #include Y_UNIT_TEST_SUITE(StringHashFunctorTests) { Y_UNIT_TEST(TestTransparencyWithUnorderedSet) { // Using Abseil hash set because `std::unordered_set` is transparent only from C++20 (while // we stuck with C++17 right now). absl::flat_hash_set, TEqualTo> s = {"foo"}; // If either `THash` or `TEqualTo` is not transparent compilation will fail. UNIT_ASSERT_UNEQUAL(s.find(TStringBuf("foo")), s.end()); UNIT_ASSERT_EQUAL(s.find(TStringBuf("bar")), s.end()); } }