More Effective C++

More Effective C++

《More Effective C++》是2006年機械工業出版社出版的圖書,作者是[美] 邁耶斯。

基本介紹

  • 書名:More Effective C++
  • 作者:[美] 邁耶斯
  • 出版社:機械工業出版社
  • 出版時間:2006年4月1日
  • ISBN:9787111188308
內容簡介,作者簡介,目錄,

內容簡介

  一些經過驗證的用來改善程式效率的方法,包括檢驗C++語言特性所帶來的時間和空間上的成本。
  全面地描述了C++專家所使用的高級技術,包括placement new、virtual constructors、smart pointers、reference counting、proxy classes和double-dispatching等。
  以實例說明異常處理帶給C++類和函式的衝擊。
  介紹新的語言特性,包括bool、mutable、explicit、namespaces、成員模板、標準模板庫等。如果你的編譯器不支持這些特性,本書還介紹了如何不利用它們完成工作。

作者簡介

  Scott Meyers擁有布朗大學計算機科學博士學位,是世界上最著名的C++軟體涵蓋發權威之一。他的“More Effective C++兩卷本”(《Effective C++》和《 More Effective C++》),開闢了技術圖書寫作的新風格。他曾擔任《C++Report》雜誌的專欄作家,經常為《C++ Users Journal》和《Dr.Dobbs Journal》撰稿。

目錄

Acknowledgments
Introduction
Basics
Item1:Distinguish between pointers and references.
Item2:Prefer C++-style casts.
Item3:Never treat arrays polymorphically.
Item4:Avoid gratuitous default constructors.
Operators
Item5:Be wary of user-defined conversion functions.
Item6:Distinguish between prefix and postfix forms of increment and decrement oferators.
Item7:Never overload &&,︴︴,or,.
Item8:Understand the different meanings of new and delete.
Exceptions
Item9:Use destructors to Prevent resource leaks.
Item10:Prevent resource leaks in comstructors.
Item11:Prevent exceptions from leaving destructors.
Item12:Understand how throwing an exception differs from passing a parameter or calling a virtual function.
Item13:Catch exception by reference.
Item14:Use exception specifications judiciously
Item15:Understand the costs of exception handling
Efficiency
Item16:Remember the 80-20 rule.
Item17:Consider using lazy evaluation.
Item18:Amortize the cost of expected computations.
Item19:Understand the origih of temporary objects.
Item20:Facilitate the return value optimization.
Item21:Overload to avoid implicit type conversions.
Item22:Consider using op=instead of stand-alone op.
Item23:Consider alternative libraries.
Item24:Understand the costs of virtual functions,multiple inheritance,virtual base classes,and RTTl
……

相關詞條

熱門詞條

聯絡我們