I've been programming on C++ for a while but there are still many things I'm not aware of. I'd love some help on this particular issue. Im analysing some stuff and came up to this:
auto x = std::make_unique<int>(5);
auto y = std::forward<std::unique_ptr<int>&>(x); // compile-error
auto z = std::forward<std::unique_ptr<int>>(x); // no compile error - turns to nullptr
Although I get it to work, I can't manage to find how does the third line works to be honest. I've searched for a while but didn't find any info that could clear this doubt of mine.