什么是复制和交换习语?

北慕城南 提交于 2020-08-04 13:41:39

问题:

What is this idiom and when should it be used? 这个习语是什么,什么时候应该使用? Which problems does it solve? 它可以解决哪些问题? Does the idiom change when C++11 is used? 使用C ++ 11时,习惯用法会改变吗?

Although it's been mentioned in many places, we didn't have any singular "what is it" question and answer, so here it is. 尽管在很多地方都提到过它,但是我们没有任何奇异的“这是什么”的问题和答案,所以就在这里。 Here is a partial list of places where it was previously mentioned: 这是先前提到的地方的部分列表:


解决方案:

参考一: https://stackoom.com/question/Dl9r/什么是复制和交换习语
参考二: https://oldbug.net/q/Dl9r/What-is-the-copy-and-swap-idiom
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!