Exceptional C++ Style: 40 New Engineering Puzzles, Programming Problems, and Solutions


Exceptional C++ Style: 40 New Engineering Puzzles, Programming Problems, and Solutions (C++ In-Depth Series) by Herb Sutter
Publisher: Addison-Wesley Professional (August 2, 2004) | ISBN-10: 0201760428 | CHM | 0,5 Mb | 352 pages

Software "style" is about finding the perfect balance between overhead and functionality... elegance and maintainability... flexibility and excess. In Exceptional C++ Style, legendary C++ guru Herb Sutter presents 40 new programming scenarios designed to analyze not only the what but the why and help you find just the right balance in your software.
Organized around practical problems and solutions, this book offers new insight into crucial C++ details and interrelationships, and new strategies for today's key C++ programming techniques--including generic programming, STL, exception safety, and more. You'll find answers to questions like:
What can you learn about library design from the STL itself?
How do you avoid making templated code needlessly non-generic?
Why shouldn't you specialize function templates? What should you do instead?
How does exception safety go beyond try and catch statements?
Should you use exception specifications, or not?
When and how should you "leak" the private parts of a class?
How do you make classes safer for versioning?
What's the real memory cost of using standard containers?
How can using const really optimize your code?
How does writing inline affect performance?
When does code that looks wrong actually compile and run perfectly, and why should you care?
What's wrong with the design of std::string?
Exceptional C++ Style will help you design, architect, and code with style--and achieve greater robustness and performance in all your C++ software.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
exceptional c++:47个c++工程难题、编程问题和解决方案(中文版)》讲述如何用标准c++进行企业级的软件开发,通过“问题/解答”的方式,启发读者思考,帮助了解隐藏在问题背后的设计思想,以及各种编程指导原则适用的场合。本书列出的条款涵盖了许多方面的主题,尤其对异常安全性、类和模块的合理设计,正确的代码优化,以及编写符合c++标准的可移植代码进行了深入的讨论。   《exceptional c++:47个c++工程难题、编程问题和解决方案(中文版)》适于有一定c++编程基础的读者阅读。 目录 《exceptional c++:47个c++工程难题、编程问题和解决方案(中文版)》 1 泛型程序设计与c++标准库 1 条款1:迭代器难度系数 1 条款2:大小写不敏感的字符串——之一 5 条款3:大小写不敏感的字符串——之二 9 条款4:可重用性最高的泛型容器——之一 12 条款5:可重用性最高的泛型容器——之二 13 条款6:临时对象 22 条款7:标准库的使用(或者,再论临时对象) 28 2 异常安全性相关的问题与技术 31 条款8:编写异常安全的代码——之一 32 条款9:编写异常安全的代码——之二 37 条款10:编写异常安全的代码——之三 40 条款11:编写异常安全的代码——之四 47 条款12:编写异常安全的代码——之五 50 条款13:编写异常安全的代码——之六 56 条款14:编写异常安全的代码——之七 62 条款15:编写异常安全的代码——之八 65 条款16:编写异常安全的代码——之九 68 条款17:编写异常安全的代码——之十 73 条款18:代码的复杂性——之一 75 条款19:代码的复杂性——之二 79 3 类的设计与继承 85 条款20:类的编写技巧 85 条款21:虚函数的重载 93 条款22:类之间的关系——之一 99 条款23:类之间的关系——之二 103 条款24:继承的使用和滥用 110 条款25:面向对象程序设计 121 4 编译器防火墙和pimpl惯用法 123 条款26:将编译期依赖性降到最低——之一 123 条款27:将编译期依赖性降到最低——之二 127 条款28:将编译期依赖性降到最低——之三 132 条款29:编译防火墙 135 条款30:fast pimpl惯用法 138 5 名字查找、名字空间和接口规则 148 条款31:名字查找与接口规则——之一 148 条款32:名字查找与接口规则——之二 152 条款33:名字查找和接口规则——之三 162 条款34:名字查找与接口规则——之四 167 6 内存管理 176 条款35:内存管理——之一 176 条款36:内存管理——之二 179 条款37:auto_ptr 186 7 误区、陷阱以及错误的惯用法 201 条款38:对象标识 201 条款39:自动转换 204 条款40:对象的生存期——之一 206 条款41:对象的生存期——之二 209 8 其他主题 219 条款42:变量的初始化 219 条款43:正确使用const 222 条款44:类型转换 231 条款45:bool 238 条款46:转调函数 242 条款47:控制流程 244 后记 254 参考书目 256

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值