mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-23 17:58:59 +00:00
AK: Replace some SFINAE with requires clauses, clean up existing ones
Add requires clauses to constraints on InputStream and OutputStream operator<< / operator>>. Make the constraint on String::number a requires clause instead of SFINAE. Also, fix some unecessary IsSame in Trie where specialized traits exist for the given use cases.
This commit is contained in:
parent
49a76164c8
commit
7d49ea9836
Notes:
sideshowbarker
2024-07-19 00:23:30 +09:00
Author: https://github.com/ADKaster
Commit: 7d49ea9836
Pull-request: https://github.com/SerenityOS/serenity/pull/4653
4 changed files with 40 additions and 29 deletions
|
@ -252,8 +252,8 @@ public:
|
|||
return vformatted(fmtstr, VariadicFormatParams { parameters... });
|
||||
}
|
||||
|
||||
template<typename T, typename EnableIf<IsArithmetic<T>::value>::Type* = nullptr>
|
||||
static String number(T value) { return formatted("{}", value); }
|
||||
template<typename T>
|
||||
static String number(T value) requires IsArithmetic<T>::value { return formatted("{}", value); }
|
||||
|
||||
StringView view() const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue