Domanda

std::function<void()> f = std::function<void()>(std::bind(fn,params));

fn - LPVOID type, params - std::vector I have an error here.C2064:term does not evaluate to a function taking 'number' arguments.

This error arise in functional.h!

I know, that i should better write something like

auto f = std::bind(fn,params);

But my task is to store lots of func pointers in a std::queue.

How can i transorm std::bind() to a specific type (or store "auto" type)?

È stato utile?

Soluzione

error: term does not evaluate to a function taking 'number' arguments

The error message may be referring to your parameter fn which, as a LPVOID, is not a function at all.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top