summaryrefslogtreecommitdiff
path: root/AK/Traits.h
diff options
context:
space:
mode:
authorMoustafa Raafat <MoustafaRaafat2@gmail.com>2022-11-14 18:20:59 +0000
committerSam Atkins <atkinssj@gmail.com>2022-12-09 11:25:30 +0000
commitae2abcebbbabf7ca8b806b5555c11cd0b216dbdb (patch)
treecef5406660d2e60fedda9dcd0839c8f88e0a2d93 /AK/Traits.h
parent9721da2e6ae2948319ae731b65073d1fe7200b4f (diff)
downloadserenity-ae2abcebbbabf7ca8b806b5555c11cd0b216dbdb.zip
Everywhere: Use C++ concepts instead of requires clauses
Diffstat (limited to 'AK/Traits.h')
-rw-r--r--AK/Traits.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/AK/Traits.h b/AK/Traits.h
index aa49b3795d..27efd35446 100644
--- a/AK/Traits.h
+++ b/AK/Traits.h
@@ -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)
{