diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-11-02 18:05:18 +0800 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-11-02 18:05:18 +0800 |
| commit | 39e63cf518074564992614c117d9e40a9011c425 (patch) | |
| tree | fdc56e88229900305916c7c093e53104bff151fc /src/ranges.hh | |
| parent | 20fe8e0112a7bf9b93333182873696f214ab3492 (diff) | |
Append '/' to highlighter group completion candidates
Diffstat (limited to 'src/ranges.hh')
| -rw-r--r-- | src/ranges.hh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ranges.hh b/src/ranges.hh index f1c11be8..fa23f180 100644 --- a/src/ranges.hh +++ b/src/ranges.hh @@ -328,6 +328,15 @@ Init accumulate(Range&& c, Init&& init, BinOp&& op) return std::accumulate(begin(c), end(c), init, op); } +template<typename Container> +auto gather() +{ + return make_view_factory([](auto&& range) { + using std::begin; using std::end; + return Container(begin(range), end(range)); + }); +} + } #endif // ranges_hh_INCLUDED |
