I have abstract class Managee and helper class Wrapper. Pointer to Managee used to construct Wrapper, then Wrapper will take ownership over Managee. I want to ensure that user will always allocate new Managee. Are rvalue-references suitable for this goal?
Wrapper definition:
...
Wrapper(Managee * && tmpptr);
Managee & GetManagee();
...
Wrapper usage:
Wrapper a(new ManageeA()); // ok;
Wrapper b(&a.GetManagee()); // error? <-----