#include <string>
#include <functional>
#include <iostream>
using namespace std;
class Worker
{
public:
static Worker* Get()
{
static Worker ff;
return &ff;
}
string Process(string& data)
{
printf("%s\n", data.c_str());
return "welcom";
}
private:
Worker();
~Worker();
};
Worker::Worker()
{
}
Worker::~Worker()
{
}
int main()
{
string data("hello world");
auto f = std::bind(&Worker::Process, Worker::Get(), std::placeholders::_1);
cout<<f(data)<<endl;
return 0;
}