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
This commit is contained in:
parent
329f291ae0
commit
07d702e419
|
@ -312,7 +312,7 @@ static const EnvVarDesc builtin_env_vars[] = { {
|
||||||
"selections_length", false,
|
"selections_length", false,
|
||||||
[](StringView name, const Context& context) -> Vector<String>
|
[](StringView name, const Context& context) -> Vector<String>
|
||||||
{ return context.selections() |
|
{ return context.selections() |
|
||||||
transform([&](const Selection& s) {
|
transform([&](const Selection& s) -> String {
|
||||||
return to_string(char_length(context.buffer(), s));
|
return to_string(char_length(context.buffer(), s));
|
||||||
}) | gather<Vector<String>>(); }
|
}) | gather<Vector<String>>(); }
|
||||||
}, {
|
}, {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user