This line complains when compiling with g++4.9
Hey thanks for asking! So given that g++ 4.9 supports c++14 (with the -std=c++14 flag), it should be possible to support it. What is the error message? Can you contribute a fix as a PR?
I think we need gcc-5.
Most of the features supported in c++ 14 are in gcc5. Compiler support for C++14 - cppreference.com
Ah thanks for the clarification, that makes sense!
Actually it failed on this type of code:
void func(std::map<int, int>& arg={}) {
}
Error message with gcc4.9
error: could not convert '<brace-enclosed initializer list>()' from '<brace-enclosed initializer list>' to 'std::map<int, int>&'
void func(std::map<int, int>& arg={}) {}
It passed on both >= g+±5
I think we use this style for the default variables, and it is probably not supported in the old compiler…
We should add a checker in bazel to make sure the compiler supports 14.
@yic do you mind creating a PR for that?
Sure, I can put that.
@sangcho I searched around, but I didn’t find a good way to do this