Fix compilation with gcc-5
Gcc-5 seems to have a bug in its handling of template variable. Fixes #2267
This commit is contained in:
parent
bd9895ea86
commit
d2509e54f2
|
@ -21,7 +21,7 @@ before_install:
|
||||||
install:
|
install:
|
||||||
- if [ $TRAVIS_OS_NAME = linux ]; then
|
- if [ $TRAVIS_OS_NAME = linux ]; then
|
||||||
if [ "$CXX" = "g++" ]; then
|
if [ "$CXX" = "g++" ]; then
|
||||||
export CXX=g++-6;
|
export CXX=g++-5;
|
||||||
fi;
|
fi;
|
||||||
elif [ $TRAVIS_OS_NAME = osx ]; then
|
elif [ $TRAVIS_OS_NAME = osx ]; then
|
||||||
brew outdated gcc || brew upgrade gcc;
|
brew outdated gcc || brew upgrade gcc;
|
||||||
|
@ -35,8 +35,8 @@ addons:
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
packages:
|
packages:
|
||||||
- libstdc++-6-dev
|
- libstdc++-5-dev
|
||||||
- g++-6
|
- g++-5
|
||||||
- libncursesw5-dev
|
- libncursesw5-dev
|
||||||
coverity_scan:
|
coverity_scan:
|
||||||
project:
|
project:
|
||||||
|
|
|
@ -1498,11 +1498,10 @@ const CommandDesc declare_option_cmd = {
|
||||||
};
|
};
|
||||||
|
|
||||||
template<bool unmap>
|
template<bool unmap>
|
||||||
static auto map_key_completer =
|
static Completions map_key_completer(const Context& context, CompletionFlags flags,
|
||||||
[](const Context& context, CompletionFlags flags,
|
|
||||||
CommandParameters params, size_t token_to_complete,
|
CommandParameters params, size_t token_to_complete,
|
||||||
ByteCount pos_in_token) -> Completions
|
ByteCount pos_in_token)
|
||||||
{
|
{
|
||||||
if (token_to_complete == 0)
|
if (token_to_complete == 0)
|
||||||
return { 0_byte, params[0].length(),
|
return { 0_byte, params[0].length(),
|
||||||
complete(params[0], pos_in_token, scopes) };
|
complete(params[0], pos_in_token, scopes) };
|
||||||
|
@ -1524,7 +1523,7 @@ static auto map_key_completer =
|
||||||
| gather<Vector<String>>()) };
|
| gather<Vector<String>>()) };
|
||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
};
|
}
|
||||||
|
|
||||||
const CommandDesc map_key_cmd = {
|
const CommandDesc map_key_cmd = {
|
||||||
"map",
|
"map",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user