mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:07:44 +00:00
Vector: Use memcmp for comparing two vectors with trivial elements
This commit is contained in:
parent
6d97caf124
commit
e8e85f5457
3 changed files with 39 additions and 8 deletions
|
@ -7,12 +7,12 @@ namespace AK {
|
|||
|
||||
template<typename T>
|
||||
struct GenericTraits {
|
||||
static constexpr bool is_trivial() { return false; }
|
||||
static bool equals(const T& a, const T& b) { return a == b; }
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct Traits : public GenericTraits<T> {
|
||||
static constexpr bool is_trivial() { return false; }
|
||||
};
|
||||
|
||||
template<>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue