mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:17:35 +00:00
Everywhere: Switch from EnableIf to requires
C++20 provides the `requires` clause which simplifies the ability to limit overload resolution. Prefer it over `EnableIf` With all uses of `EnableIf` being removed, also remove the implementation so future devs are not tempted.
This commit is contained in:
parent
8f7219c6fa
commit
2844f7c333
9 changed files with 63 additions and 73 deletions
|
@ -692,8 +692,8 @@ ErrorOr<void> Formatter<FormatString>::vformat(FormatBuilder& builder, StringVie
|
|||
return {};
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
ErrorOr<void> Formatter<T, typename EnableIf<IsIntegral<T>>::Type>::format(FormatBuilder& builder, T value)
|
||||
template<Integral T>
|
||||
ErrorOr<void> Formatter<T>::format(FormatBuilder& builder, T value)
|
||||
{
|
||||
if (m_mode == Mode::Character) {
|
||||
// FIXME: We just support ASCII for now, in the future maybe unicode?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue