vendredi 3 août 2018

how can I bind a class member function with param as rvalue to boost::function?

I try to bind a class member function with param as rval to boost::function. But it doesn't work. my sample false code :

class Class1
{
    int Foo1(int&& b)
    {
        return b;
    }   

    void foo2()
    {
        boost::function<int(int&&)> fc(boost::bind(&Class1::Foo1, this, _1) 
    }   
};

Aucun commentaire:

Enregistrer un commentaire