AK: Remove unused and unintuitive Trait for char*

We don't use char* in containers, and the expectation would be a pointer
compare instead of a string compare; so remove this specialisation
entirely.

Fixes #26267.

(cherry picked from commit 09c9321a560e0f7070b046f74f9283313d5aaa4e)
This commit is contained in:
Ali Mohammad Pur authored and Ali Mohammad Pur committed 2025-10-21 19:23:46 +02:00
1 parent 90fe3c9a36
commit 594d9f6bd3
1 file changed
-7
-7
View File
@@ -75,13 +75,6 @@ struct Traits<T> : public DefaultTraits<T> {
static constexpr bool is_trivially_serializable() { return Traits<UnderlyingType<T>>::is_trivially_serializable(); }
};
template<typename T>
requires(Detail::IsPointerOfType<char, T>) struct Traits<T> : public DefaultTraits<T> {
static unsigned hash(T const value) { return string_hash(value, strlen(value)); }
static constexpr bool equals(T const a, T const b) { return strcmp(a, b); }
static constexpr bool is_trivial() { return true; }
};
}
#if USING_AK_GLOBALLY