摘要: #include<memory>#include<iostream>#include<utility>#include<string.h>#include<stdlib.h>using namespace std;class Widget{public: Widget(){ cout << "Wid 阅读全文
posted @ 2019-03-20 21:56 whichone 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 1、左值右值都是引用 2、万能引用只是符合两条规则的右值引用:①首先它能识别出T应该是左值还是右值②它能够把识别出的T的左右值符号和已有的符号进行合成 3、forward接受的一直都是一个左值,不过它往往在模板中和万能引用搭配使用。万能引用在初始化时,会记录实参为左值还是右值,(万能指针也没什么特别 阅读全文
posted @ 2019-03-20 17:19 whichone 阅读(271) 评论(0) 推荐(0) 编辑