Compiler error C3493: ‘func’ cannot be implicitly captured because no default capture mode has been specified

You need to specify how to capture func into the lambda.

[] don’t capture anything

[&] capture-by-reference

[=] capture-by-value (copy)

T::ForEach([&](T *what) {

I’d also recommend that you should send func by const reference.

static void ComputeGenericDropCount(const function<void(Npc *, int)>& func)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)