Вебинар: Go-Go-Gadg...Error? Смотрим, как ошибаются Go разработчики! - 26.08
V1047. Lifetime of the lambda is greater than lifetime of the local variable captured by reference.
V1047 Lifetime of the lambda is greater than lifetime of the local variable 'do_stop' captured by reference. FillBedJob.cpp 250
void FillBedJob::process(Ctl &ctl)
{
// ....
bool do_stop = false;
// ....
params.on_packed =
[&do_stop] (const ArrangePolygon &ap)
{
do_stop = ap.bed_idx > 0 && ap.priority == 0;
};
// ....
}
Similar errors can be found in some other places: