Effective Modern C++

Scott Meyers

出版时间

2015-08-31

ISBN

9787564159115

评分

★★★★★

标签

编程

书籍介绍

《Effective Modern C++:改善C++11和C++14的42个具体做法(影印版)(英文版)》中包括以下主题:剖析花括号初始化、noexcept规范、完美转发、智能指针make函数的优缺点;讲解std∷move,std∷forward,rvalue引用和全局引用之间的关联;介绍编写清晰、正确、高效lambda表达式代码的技巧;辨析std∷atomic和volatile之间的差异,它们各自该如何使用,还有它们与C++并行计算API之间的关联;如何修改老C++编程(比如C++98)中的实践,使之符合现代C++的软件开发规范。

AI导读
核心看点
  • 深入解析C++11/14的42个具体做法
  • 涵盖类型推导、移动语义、Lambda等核心特性
  • 指导如何将旧代码迁移至现代C++规范
适合谁读
  • 具备C++基础,希望掌握现代特性的开发者
  • 从事高性能、并发编程的C++工程师
  • 需将C++98/03项目升级至现代标准的团队
读前提醒
  • 本书为英文影印版,需具备一定英语阅读能力
  • 内容较深,建议配合中文社区翻译对照阅读
  • 部分条款相互关联,建议通读后反复查阅
读者共识
  • 内容精深,是学习现代C++的必读经典之作
  • 条款独立性强,无传统技术书末尾注水现象
  • 部分章节顺序突兀,新手阅读门槛较高

本导读基于书籍简介、目录、原文摘录、短评和书评生成,不等同于全文精读。

精彩摘录
  • "......create softerware that's correct efficient maintainable portable"
  • "C++98 had a single set of rules for type deduction: the one for function templates. C++11 modifies that ruleset a bit and add two more, one for auto and one for decltype. C++14 then extends the usage contexts in which auto and decltype may be employed."
  • "When users of a complex system are ignorant of how it works, yet happy with what it does, that says a lot about the design of the system. By this measure, template type deduction in C++ is a tremendous success."
  • "The ability to declare references to arrays enables creation of a template that deduces the number of elements that an array contains."
  • "The only real difference between auto and template type deduction is that auto assumes that a braced initializer represents a std::initializer_list, but the template type deduction doesn't."
  • "In C++11, perhaps the primary use for decltype is declaring function templates where the function's return type depends on its parameter types."
  • "The use of "decltype(auto)" is not limited to function return type. I can also be convenient for declaring variables when you want to apply the decltype type deduction rules to the initializing expression."
  • "Employing pass-by-value for objects of an unknown type generally risks the performance hit of unnecessary copying, the behavioral problems of object slicing, and ..."
目录
From the Publisher
Acknowledgments
Introduction
1.Deduang Types
Item 1: Understand template type deduction.

显示全部
用户评论
理清了C++11以及C++14的一些特性,值得反复阅读
C++这傻逼语言赶紧死吧,光把语言细节搞清楚都费太多时间了。
影印版,内容精深,纸质很赞。
印刷太差,出版社太贪
一些地方感觉有些教条主义了,比较适合多次阅读
不愧是经典,中文翻译:https://github.com/kelthuzadx/EffectiveModernCppChinese
文风比十好几年前基于C++ 98/03标准的Effective系列风趣了好多。质量一如继往的上乘。另外这种逐条陈述的书各个条目之间相对独立,不会有一般技术书那种到最后几章干货和有用信息越来越稀的效应(我把它叫做“狗尾”效应)。
收藏