#include <iostream>
#include <functional>
class Foo
{
public:
int a;
void say(){"I'm foo\n";}
};
class FooManager
{
public:
void takeFoo(Foo *f){f->say();}
};
int main()
{
FooManager mf;
std::function<void()> func=std::bind(&FooManager::takeFoo, &mf, new Foo);
func();
std::cin.get();
}
Isn't this supposed to print "I'm foo"?
It's not doing anything