I am having a lot of trouble using std::bind in various places of my code. Sometimes it works, sometimes it doesn\'t, so I assume I am doing something fundament
std::bind
The _2 placeholder means to use second argument of the returned functor. Therefore the type of
_2
std::bind(foo,1,_2)
is not std::function but
std::function
To get std::function, use
std::bind(foo, 1, _1) // ^^