NVlabs/timeloop

Error while building timeloop

FuyuWang opened this issue · 1 comments

Hi,
I'm getting the following error while building timeloop. How can I resolve this?
src/compound-config/compound-config.cpp:416:29: error: loop variable ‘m’ of type ‘const string&’ {aka ‘const std::__cxx11::basic_string&’} binds to a temporary constructed from type ‘libconfig::Setting’ [-Werror=range-loop-construct]
416 | for (const std::string& m: LNode->lookup(name))

use non-reference type ‘const string’ {aka ‘const std::__cxx11::basic_string’} to make the copy explicit or ‘const libconfig::Setting&’ to prevent copying compilation terminated due to -fmax-errors=1.

I am using gcc (Ubuntu 11.1.0-1ubuntu1~18.04.1) 11.1.0

We have not yet tested with gcc 11. It looks like the compiler is giving you a suggestion to clean up that piece of code. Could you give it a shot and see if it works? Thanks.