T
Tanguy Fautré
Hi,
given a class
class foo
{
private:
void A();
type B();
};
I want to call in A()
std::generate(V.begin(), V.end(), B);
where V is just a standard container of elements of the type "type", but it
does NOT necessarly contains instances of the class foo.
The idea is that B is a member function of foo but that the objects in the
container are not of the type foo.
I cannot make B static 'cause it uses members variables of the class foo.
I supposed I need something like std::generator(V.begin(), V.end(),
bind_func(* this, B)) but what exactly?
Best regards,
Tanguy
given a class
class foo
{
private:
void A();
type B();
};
I want to call in A()
std::generate(V.begin(), V.end(), B);
where V is just a standard container of elements of the type "type", but it
does NOT necessarly contains instances of the class foo.
The idea is that B is a member function of foo but that the objects in the
container are not of the type foo.
I cannot make B static 'cause it uses members variables of the class foo.
I supposed I need something like std::generator(V.begin(), V.end(),
bind_func(* this, B)) but what exactly?
Best regards,
Tanguy