In the piece of code referred by the above link, I am quite confused why we do not we return std::unique_ptr from map by means of std::move(), I tried and the code did not generate numbers. However if we use std::unique_ptr& as the return type it works? what is the problem?
https://github.com/PacktPublishing/The-Modern-Cpp-Challenge/blame/6a79f529c038a15c752acb67b4aef7c0d366f1a3/Chapter08/problem_69/main.cpp#L146-L151
In the piece of code referred by the above link, I am quite confused why we do not we return std::unique_ptr from map by means of std::move(), I tried and the code did not generate numbers. However if we use std::unique_ptr& as the return type it works? what is the problem?