1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:27: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

@ -9,6 +9,7 @@
#pragma once
#include <AK/ByteBuffer.h>
#include <AK/Concepts.h>
#include <AK/DeprecatedString.h>
#include <AK/Span.h>
#include <AK/Types.h>
@ -25,8 +26,8 @@ public:
static constexpr size_t BITS_IN_WORD = 32;
// This constructor accepts any unsigned with size up to Word.
template<typename T>
requires(IsIntegral<T> && sizeof(T) <= sizeof(Word))
template<Integral T>
requires(sizeof(T) <= sizeof(Word))
UnsignedBigInteger(T value)
{
m_words.append(static_cast<Word>(value));