I\'m having trouble in detecting why the heck is this not compiling. I\'ve got some lambda function that returns a std::function based on some argument.
some_fun wants argument of type const std::function.
std::bind returns "a function object of unspecified type T" (look at provided link, section "Return value"), that you are trying to pass as some_fun argument.
It seems this causes problem, because this argument type is not expected.
Look at: http://en.cppreference.com/w/cpp/utility/functional/bind