Effective Modern C++

Scott Meyers

出版时间

2014-12-01

ISBN

9781491903995

评分

★★★★★
书籍介绍
这本书最引争议之处,恰是它的核心价值:它系统梳理了C++11/14为填补C++98旧坑而引入的新特性,却发现许多特性
作者简介
Scott Meyers is one of the world's foremost authorities on C++. He wrote the best-selling Effective C++ series (Effective C++, More Effective C++, and Effective STL); published and maintains the annotated training materials Overview of the New C++ (C++11/14) and Effective C++ in an Embedded Environment; is Consulting Editor for the Effective Software Development Series, and, with Herb Sutter and Andrei Alexandrescu, is a principal in C++ and Beyond. He has a Ph.D in Computer Science from Brown University. He's currently working on a new book, Effective Modern C++, which he expects to publish this fall.
AI导读
核心看点
  • 涵盖C++11/14新特性,提供42条实战建议
  • 深入解析auto、decltype及类型推导规则
  • 详解智能指针、右值引用与移动语义用法
读者共识
  • 作者功力深厚,对语言细节解析透彻且实用
  • C++11/14新特性虽强大,但也引入了不少坑
  • 内容偏重语言特性说明,部分读者觉枯燥
精彩摘录
  • "......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 ..."
用户评论
书还是可以的,但看着看着不免有“吾生也有崖”的感慨,无比嫌弃这一个个坑,而不是豁然开朗的痛快。
一如既往的经典
感觉就是C++11虽然填上了一些C++98的坑,但又引入了不少新坑。挺多新特性并不像它们表面上看起来那样简单。不过Meyers确实功力深厚,每个特性的前因后果都讲的一清二楚,给出的使用建议也很贴合实际。(其中关于smat pointer的部分看得我一头冷汗,自己写的程序里有不少错误的用法)
到处是坑,人生苦短,早弃早享受
可以在 Safari Books Online 上读 http://proquest.safaribooksonline.com/book/programming/cplusplus/9781491908419
终于读完了,仅条款1就让我叹服。 迈向现代c++必读书。
翻译一般
先看看基础的,右值引用和并发这种等需要的时候再回来学
非常棒,讲解深入,书中例子多
Meyers先生真爱用GRE词汇 是读过最好的C++书
下载
收藏