Assume you're having this simple class:
class GenericClass {
public:
GenericClass(std::unique_ptr<uint8_t[]>& lref) {
this->var = std::move(lref);
}
private:
std::unique_ptr<uint8_t[]> var;
}
How exactly is the ctor handling the "move"? Is the ownership of the lvalue that the reference points to transferred to the member variable or is the reference another lvalue?
Aucun commentaire:
Enregistrer un commentaire