1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#include <iostream>
#include <string>
#include <boost/function.hpp>
#include <boost/thread.hpp>
struct S
{
void f(std::string s, double d1, double d2)
{
}
};
typedef boost::function<void(std::string, double, double)> Fsdd;
struct DataBaseRequest
{
void retrieveMontantNegoTitre(Fsdd callFunc)
{
}
};
int main()
{
S s;
DataBaseRequest dbr;
boost::thread t(&DataBaseRequest::retrieveMontantNegoTitre,
dbr, Fsdd(boost::bind(&S::f, s, "titi", 1.0, 2.0)));
t.join();
} |
Partager