kernel/physical_core: Make use of std::unique_ptr
shared_ptr was used in 2d1984c20c
due to a
misunderstanding of how the language generates move constructors and
move assignment operators.
If a destructor is user-provided, then the compiler won't generate the
move constructor and move assignment operators by default--they must be
explicitly opted into.
The reason for the compilation errors is due to the fact that the
language will fall back to attempting to use the copy constructor/copy
assignment operators if the respective move constructor or move
assignment operator is unavailable.
Given that we explicitly opt into them now, the the move constructor and
move assignment operators will be generated as expected.
master
parent
16e7b7b83d
commit
2de2bb980e
Loading…
Reference in New Issue