
| 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 …… |
商品评论(0条)