Skip to content

Commit

Permalink
AK: Support formatting Vectors with any inline_capacity
Browse files Browse the repository at this point in the history
The default Vector type has its inline capacity set to 0, which means
any Vector with non-zero inline capacity was unformattable.
  • Loading branch information
IdanHo authored and awesomekling committed Feb 3, 2022
1 parent 6b0c490 commit be4c144
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AK/Format.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit be4c144

Please sign in to comment.