06 2018 档案

摘要:C++标准委员会不应该制定一条阻止程序员拿起枪朝自己的脚丫子开火的规则。 右值引用(rvalue)、交付语义(move) 最近阅读《C++标准库第二版》,看到第二章介绍C++11新特性3.1.5节时卡住了。固化的拷贝函数思维,对自认为理所当然的多次拷贝带来的构造和析构的性能瓶颈是否能够优化没有任何想 阅读全文

posted @ 2018-06-28 15:42 凌庸 阅读(209) 评论(0) 推荐(0) 编辑

摘要:C++标准库第二版笔记 2 微小但重要的语法提升 template表达式内的空格: vector< list<int> >; // OK in each C++ version vector<list<int>>; // OK since C++11 取消二异性的nullptr std::nullp 阅读全文

posted @ 2018-06-27 13:54 凌庸 阅读(188) 评论(0) 推荐(0) 编辑

摘要:C++标准库第二版笔记 1 C++ std历史 第一份标准化文档: C++98 & C++03 & TR1 TR1 Information Technology- Programming Languages - Technical Report on C++ Library Extensions 内 阅读全文

posted @ 2018-06-27 01:11 凌庸 阅读(407) 评论(0) 推荐(0) 编辑

摘要:32 : Make sure public inheritance models "is-a." 0 引言 Inheritance and Object-Oriented Design 从这一章开始,我们将阅读到有关程序设计的条款。 如果你之前是其他程序的编写者,要做好对C++特色OOP与众不同的准 阅读全文

posted @ 2018-06-25 13:17 凌庸 阅读(158) 评论(0) 推荐(0) 编辑

摘要:31 : Minimize compilation dependencies between files 1 这关乎C++的类(或说都是类惹的祸) 1.1 C++类定义式的问题 C++类定义式不只叙述了class接口,还包括十足的实现细目。将导致编译依存关系(compilation dependen 阅读全文

posted @ 2018-06-24 19:21 凌庸 阅读(246) 评论(0) 推荐(0) 编辑

摘要:30 : Understand the ins and outs of inlining 1 inline申请书 1.1 类内部实现函数包含隐藏的inline申请 class Human { public: Human() { } // 这个也是inline函数吗?参考3.2 int age() c 阅读全文

posted @ 2018-06-23 21:31 凌庸 阅读(148) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示