I can't figure out what the error here means, nor the constructor it would be referencing.
void generateEffect(Effect e){
static const map<string, void (*)(Effect e, vector<variant<int>> setUpData)> dataDict = {
{
"String", [](Effect e, vector<variant<int>> setUpData){
e.data = {0};
e.onUpdate.push_back(tuple <void (*)(Effect e), int>
{//<- Error is here
[&setUpData](Effect e){
var = get<int>(setUpData[0]);
}, 1});
}
}
};
};
When I change the code to not include the setUpData capture, i.e.
e.onUpdate.push_back(tuple <void (*)(Effect e), int>
{
[](Effect e){}, 5});
}
the error goes away. What should I do?