Trying to compile this with gcc-9/10 results in the following error:
[ 59%] Building CXX object 3rd_party/marian/src/CMakeFiles/marian.dir/common/cli_wrapper.cpp.o
In file included from /mnt/Storage/mts/src/./service/api/rapidjson_utils.h:10,
from /mnt/Storage/mts/src/service/api/bergamot/node_translation.cpp:2:
/mnt/Storage/mts/src/./service/common/translation_service.h:92:52: error: non-local lambda expression cannot have a capture-default
92 | std::function<void (Ptr<Job> j)> callback =[=](Ptr<Job> j){return;});
| ^
In file included from /mnt/Storage/mts/src/service/common/plaintext_translation.cpp:2:
/mnt/Storage/mts/src/service/common/translation_service.h:92:52: error: non-local lambda expression cannot have a capture-default
92 | std::function<void (Ptr<Job> j)> callback =[=](Ptr<Job> j){return;});
| ^
In file included from /mnt/Storage/mts/src/service/api/rapidjson_utils.h:10,
from /mnt/Storage/mts/src/service/api/rapidjson_utils.cpp:5:
/mnt/Storage/mts/src/./service/common/translation_service.h:92:52: error: non-local lambda expression cannot have a capture-default
92 | std::function<void (Ptr<Job> j)> callback =[=](Ptr<Job> j){return;});
| ^
In file included from /mnt/Storage/mts/src/service/api/rapidjson_utils.h:10,
from /mnt/Storage/mts/src/service/api/output_options.cpp:3:
/mnt/Storage/mts/src/./service/common/translation_service.h:92:52: error: non-local lambda expression cannot have a capture-default
92 | std::function<void (Ptr<Job> j)> callback =[=](Ptr<Job> j){return;});
Hey,
Trying to compile this with gcc-9/10 results in the following error:
This change seems to have happened in gcc around 2018: https://patchwork.ozlabs.org/project/gcc/patch/20180813185028.GQ4317@redhat.com/
Removing the
=
fixes the issue, but I'm not sure if this is the right thing to do.