Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
story
0 points
dkersten
6y ago
0 comments
Share
Sorry, I edited right after hitting reply to clarify that I'm assuming the intention was to std::move the unique_ptr in, since it was T&& and not T&. Would that still not work?
0 comments
default
newest
oldest
Rusky
6y ago
It would still not work. All std::move does is cast to T&&, enabling overload resolution to pick a function with T&& as its parameter type.
dkersten
OP
6y ago
Thanks for explaining!
j
/
k
navigate · click thread line to collapse