Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
289 views
in Technique[技术] by (71.8m points)

c++ - Difference between std::move() and std::add_rvalue_reference()

Can somebody explain the difference between std::move() and std::add_rvalue_reference()? Do both serve the same purpose? If yes, what is the advantage of one over the other?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

std::move is a cast on an object, std::add_rvalue_reference manipulates a type, other than both dealing with r-value references they aren't really related.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...