Skip to content

[DF] Compilation failure when a mutable lambda is passed to Foreach #8317

@eguiraud

Description

@eguiraud

To Reproduce

#include <ROOT/RDataFrame.hxx>

int main() {
   int i = 0;
   ROOT::RDataFrame(10).Foreach([&](ULong64_t e) mutable { ++i; }, {"rdfentry_"});
   return i;
}

Currently this fails to compile because the helper type AddSlotParameter expects a const functor.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions