1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:37:45 +00:00

Everywhere: Use C++ concepts instead of requires clauses

This commit is contained in:
Moustafa Raafat 2022-11-14 18:20:59 +00:00 committed by Sam Atkins
parent 9721da2e6a
commit ae2abcebbb
17 changed files with 60 additions and 61 deletions

View file

@ -29,8 +29,8 @@ template<typename T>
struct Traits : public GenericTraits<T> {
};
template<typename T>
requires(IsIntegral<T>) struct Traits<T> : public GenericTraits<T> {
template<Integral T>
struct Traits<T> : public GenericTraits<T> {
static constexpr bool is_trivial() { return true; }
static constexpr unsigned hash(T value)
{
@ -42,8 +42,8 @@ requires(IsIntegral<T>) struct Traits<T> : public GenericTraits<T> {
};
#ifndef KERNEL
template<typename T>
requires(IsFloatingPoint<T>) struct Traits<T> : public GenericTraits<T> {
template<FloatingPoint T>
struct Traits<T> : public GenericTraits<T> {
static constexpr bool is_trivial() { return true; }
static constexpr unsigned hash(T value)
{