mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 16:37:47 +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
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