1
Fork 0
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:
Andreas Kling 2019-08-07 15:05:10 +02:00
parent 6d97caf124
commit e8e85f5457
3 changed files with 39 additions and 8 deletions

View file

@ -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<>