From 07d702e419a5315e72041599ffc1465cca3f3439 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Tue, 17 Mar 2020 09:00:29 +0300 Subject: [PATCH] src: Fix a compilation bug with g++-8 The Ubuntu Disco distribution comes with `g++` v8 installed by default, which is not able to deduce the return type of a particular call to `transform()`. This commit explicitly declares the return type to mitigate that problem, and allow the file to compile. Fixes #3410 --- src/main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cc b/src/main.cc index f16e9f9a..48d4e3ab 100644 --- a/src/main.cc +++ b/src/main.cc @@ -312,7 +312,7 @@ static const EnvVarDesc builtin_env_vars[] = { { "selections_length", false, [](StringView name, const Context& context) -> Vector { return context.selections() | - transform([&](const Selection& s) { + transform([&](const Selection& s) -> String { return to_string(char_length(context.buffer(), s)); }) | gather>(); } }, {