AK: Support formatting Vectors with any inline_capacity

The default Vector type has its inline capacity set to 0, which means
any Vector with non-zero inline capacity was unformattable.
This commit is contained in:
Idan Horowitz 2022-02-03 16:23:52 +02:00 committed by Andreas Kling
parent 6b0c4908df
commit be4c144524
Notes: sideshowbarker 2024-07-17 19:49:59 +09:00

View File

@ -329,8 +329,8 @@ struct Formatter<StringView> : StandardFormatter {
ErrorOr<void> format(FormatBuilder&, StringView);
};
template<typename T>
requires(HasFormatter<T>) struct Formatter<Vector<T>> : StandardFormatter {
template<typename T, size_t inline_capacity>
requires(HasFormatter<T>) struct Formatter<Vector<T, inline_capacity>> : StandardFormatter {
Formatter() = default;
explicit Formatter(StandardFormatter formatter)