diff options
| author | Maxime Coste <mawww@kakoune.org> | 2021-11-21 11:15:08 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2021-11-21 11:41:50 +1100 |
| commit | 91550639bbbd20c92957b83abfbb3ec4c43b3ab4 (patch) | |
| tree | 6559c52e84e7e1abef540cf0636f322c1e5acbea /src/string_utils.hh | |
| parent | cd2172eed6dd7aca7c24972e4dac0258e19c070b (diff) | |
More C++20 refactorings
Use CTAD instead of make functions, requires instead of enable_if
Diffstat (limited to 'src/string_utils.hh')
| -rw-r--r-- | src/string_utils.hh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/string_utils.hh b/src/string_utils.hh index a11aaa91..1c2d4076 100644 --- a/src/string_utils.hh +++ b/src/string_utils.hh @@ -95,9 +95,9 @@ struct WrapView inline auto wrap_at(ColumnCount max_width) { - return make_view_factory([=](StringView text) { + return ViewFactory{[=](StringView text) { return WrapView{text, max_width}; - }); + }}; } int str_to_int(StringView str); // throws on error |
