C ++中的值语义和移动语义之间有什么联系? [英] What's the connection between value semantics and move semantics in C++?
本文介绍了C ++中的值语义和移动语义之间有什么联系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有很多文章讨论了值语义与参考语义,也许还有更多的文章试图解释移动语义.但是,没有人谈论过价值语义和移动语义之间的联系.它们是正交的概念吗?
There're plenty of articles discussing value semantics vs reference semantics, and maybe more trying to explain move semantics. However, No one has ever talked about the connection between value semantics and move semantics. Are they orthogonal concepts?
注意:这个问题不是关于比较值语义和移动语义的,因为很显然这两个概念不是可比较的".这个问题是关于它们如何连接的,特别是(如@StoryTeller所说的)是关于(如何)讨论的:
Note: This question is NOT about comparing value semantics vs move semantics, cause it is perfectly clear these two concepts are not "comparable". This question is about how they are connected, specifically (like @StoryTeller said), about discussing(how):
移动语义有助于促进更多使用值类型.
Move semantics help facilitate more use of value types.
推荐答案
查看全文