Figuring out std::move's behaviour without internet access
This weekend I had a problem with std::move() and std::unique_ptr. What I wanted to know was very simple: when you move a to b, does b get destroyed? Or is a simply moved to b, and b left dangling? What if the type of a and b has a std:unique_ptr member? My first thought was "Ofcourse the memory gets managed correctly, otherwise moving would be tedious and cumbersome and that's (probably) not what std::unique_ptr is meant to be.". That sounds logical, but I wasn't a 100% sure.