Why is this std::bind not converted to std::function?
- by dauphic
Why is the nested std::bind in the below code not implicitly converted to an std::function<void()> by any of the major compilers (VS2010/2012, gcc, clang)? Is this standard behavior, or a bug?
#include <functional>
void bar(int, std::function<void()>) { }
void foo() { }
int main()
{
std::function<void(int, std::function<void()>)> func;
func = std::bind(bar, 5, std::bind(foo));
std::cin.get();
return 0;
}