
c c++
流浪海苔
这个作者很懒,什么都没留下…
展开
-
为什么需要auto_ptr_ref
这几天开始拜读侯捷先生和孟岩先生的译作《C++标准程序库:自修教程与参考手册》 。两位先生确实译功上乘,读得很顺。但是读到P55页关于auto_ptr_ref的讨论,却百思不得其解:为什么需要引入auto_ptr_ref这个辅助类呢? 从书中描述来看,仿佛与拷贝构造函数 、右值 、类型转换 有关。于是,结合auto_ptr的源代码,google之、baidu之,找了一推资料,终于初步 搞转载 2014-08-28 15:46:39 · 454 阅读 · 0 评论 -
using Declaration
using Declaration Syntax using [typename][::] nested-name-specifier unqualified-id using :: unqualified-id The using declaration introduces a name into the declarative region in which the using转载 2014-11-16 22:24:46 · 1130 阅读 · 0 评论 -
关于namespace的困惑
#include using namespace std; namespace NS { class T {}; void d(T) { cout << "void d(T)" << endl; } } NS::T param; int main() { d(param); return 0; }原创 2014-11-18 12:43:16 · 416 阅读 · 0 评论