mardi 3 janvier 2017

Return moveable member variable from class

class foo{
public:
    bar steal_the_moveable_object();
private:
    bar moveable_object;
};

main(){
    foo f;
    auto moved_object= f.steal_the_moveable_object();
}

How can implement steal_the_movebale_object to move the moveable_object into the moved_object ?

Aucun commentaire:

Enregistrer un commentaire