1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:28:12 +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

@ -6,6 +6,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/Concepts.h>
#include <AK/DeprecatedString.h>
#include <LibJS/Print.h>
#include <LibJS/Runtime/Array.h>
@ -362,9 +363,8 @@ ErrorOr<void> print_async_generator(JS::PrintContext& print_context, JS::AsyncGe
return {};
}
template<typename T>
template<Arithmetic T>
ErrorOr<void> print_number(JS::PrintContext& print_context, T number)
requires IsArithmetic<T>
{
TRY(js_out(print_context, "\033[35;1m"));
TRY(js_out(print_context, "{}", number));