logo资料库

Effective_C++_3rd_Edition.pdf 英文原版

第1页 / 共387页
第2页 / 共387页
第3页 / 共387页
第4页 / 共387页
第5页 / 共387页
第6页 / 共387页
第7页 / 共387页
第8页 / 共387页
资料共387页,剩余部分请下载后查看
[Trial version] Effective C++ Third Edition 55 Specific Ways to Improve Your Programs and Designs
[Trial version] Table of Contents
[Trial version] Copyright
[Trial version] Praise for Effective C++, Third Edition
[Trial version] Addison-Wesley Professional Computing Series
[Trial version] Preface
[Trial version] Acknowledgments
[Trial version] Introduction
[Trial version] Terminology
[Trial version] Chapter 1. Accustoming Yourself to C++
[Trial version] Item 1: View C++ as a federation of languages
[Trial version] Item 2: Prefer consts, enums, and inlines to #defines
[Trial version] Item 3: Use const whenever possible
[Trial version] Item 4: Make sure that objects are initialized before they're used
[Trial version] Chapter 2. Constructors, Destructors, and Assignment Operators
[Trial version] Item 5: Know what functions C++ silently writes and calls
[Trial version] Item 6: Explicitly disallow the use of compiler-generated functions you do not want
[Trial version] Item 7: Declare destructors virtual in polymorphic base classes
[Trial version] Item 8: Prevent exceptions from leaving destructors
[Trial version] Item 9: Never call virtual functions during construction or destruction
[Trial version] Item 10: Have assignment operators return a reference to *this
[Trial version] Item 11: Handle assignment to self in operator=
[Trial version] Item 12: Copy all parts of an object
[Trial version] Chapter 3. Resource Management
[Trial version] Item 13: Use objects to manage resources.
[Trial version] Item 14: Think carefully about copying behavior in resource-managing classes.
[Trial version] Item 15: Provide access to raw resources in resource-managing classes.
[Trial version] Item 16: Use the same form in corresponding uses of new and delete.
[Trial version] Item 17: Store newed objects in smart pointers in standalone statements.
[Trial version] Chapter 4. Designs and Declarations
[Trial version] Item 18: Make interfaces easy to use correctly and hard to use incorrectly
[Trial version] Item 19: Treat class design as type design
[Trial version] Item 20: Prefer pass-by-reference-to-const to pass-by-value
[Trial version] Item 21: Don't try to return a reference when you must return an object
[Trial version] Item 22: Declare data members private
[Trial version] Item 23: Prefer non-member non-friend functions to member functions
[Trial version] Item 24: Declare non-member functions when type conversions should apply to all parameters
[Trial version] Item 25: Consider support for a non-throwing swap
[Trial version] Chapter 5. Implementations
[Trial version] Item 26: Postpone variable definitions as long as possible.
[Trial version] Item 27: Minimize casting.
[Trial version] Item 28: Avoid returning "handles" to object internals.
[Trial version] Item29: Strive for exception-safe code.
[Trial version] Item 30: Understand the ins and outs of inlining.
[Trial version] Item31: Minimize compilation dependencies between files.
[Trial version] Chapter 6. Inheritance and Object-Oriented Design
[Trial version] Item 32: Make sure public inheritance models "is-a."
[Trial version] Item 33: Avoid hiding inherited names
[Trial version] Item 34: Differentiate between inheritance of interface and inheritance of implementation
[Trial version] Item 35: Consider alternatives to virtual functions
[Trial version] Item 36: Never redefine an inherited non-virtual function
[Trial version] Item 37: Never redefine a function's inherited default parameter value
[Trial version] Item 38: Model "has-a" or "is-implemented-in-terms-of" through composition
[Trial version] Item 39: Use private inheritance judiciously
[Trial version] Item 40: Use multiple inheritance judiciously
[Trial version] Chapter 7. Templates and Generic Programming
[Trial version] Item 41: Understand implicit interfaces and compile-time polymorphism
[Trial version] Item 42: Understand the two meanings of typename
[Trial version] Item 43: Know how to access names in templatized base classes
[Trial version] Item 44: Factor parameter-independent code out of templates
[Trial version] Item 45: Use member function templates to accept "all compatible types."
[Trial version] Item 46: Define non-member functions inside templates when type conversions are desired
[Trial version] Item 47: Use traits classes for information about types
[Trial version] Item 48: Be aware of template metaprogramming
[Trial version] Chapter 8. Customizing new and delete
[Trial version] Item 49: Understand the behavior of the new-handler
[Trial version] Item 50: Understand when it makes sense to replace new and delete
[Trial version] Item 51: Adhere to convention when writing new and delete
[Trial version] Item 52: Write placement delete if you write placement new
[Trial version] Chapter 9. Miscellany
[Trial version] Item 53: Pay attention to compiler warnings.
[Trial version] Item 54: Familiarize yourself with the standard library, including TR1
[Trial version] Item.55: Familiarize yourself with Boost.
[Trial version] Appendix A. Beyond Effective C++
[Trial version] Appendix B. Item Mappings Between Second and Third Editions
[Trial version] Index
[Trial version] index_SYMBOL
[Trial version] index_A
[Trial version] index_B
[Trial version] index_C
[Trial version] index_D
[Trial version] index_E
[Trial version] index_F
[Trial version] index_G
[Trial version] index_H
[Trial version] index_I
[Trial version] index_J
[Trial version] index_K
[Trial version] index_L
[Trial version] index_M
[Trial version] index_N
[Trial version] index_O
[Trial version] index_P
[Trial version] index_R
[Trial version] index_S
[Trial version] index_T
[Trial version] index_U
[Trial version] index_V
[Trial version] index_W
[Trial version] index_X
[Trial version] index_Z
###E###
ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html < Day Day Up > Effective C++ Third Edition 55 Specific Ways to Improve Your Programs and Designs By Scott Meyers ............................................... Publisher: Addison Wesley Professional Pub Date: May 12, 2005 Print ISBN: 0-321-33487-6 Pages: 320 Table of Contents | Index Copyright Praise for Effective C++, Third Edition Addison-Wesley Professional Computing Series Preface Acknowledgments Introduction Terminology Chapter 1. Accustoming Yourself to C++ Item 1: View C++ as a federation of languages Item 2: Prefer consts, enums, and inlines to #defines Item 3: Use const whenever possible Item 4: Make sure that objects are initialized before they're used Chapter 2. Constructors, Destructors, and Assignment Operators Item 5: Know what functions C++ silently writes and calls Item 6: Explicitly disallow the use of compiler-generated functions you do not want Item 7: Declare destructors virtual in polymorphic base classes Item 8: Prevent exceptions from leaving destructors Item 9: Never call virtual functions during construction or destruction Item 10: Have assignment operators return a reference to *this Item 11: Handle assignment to self in operator= Item 12: Copy all parts of an object Chapter 3. Resource Management Item 13: Use objects to manage resources. Item 14: Think carefully about copying behavior in resource-managing classes. Item 15: Provide access to raw resources in resource-managing classes. Item 16: Use the same form in corresponding uses of new and delete. Item 17: Store newed objects in smart pointers in standalone statements. Chapter 4. Designs and Declarations Item 18: Make interfaces easy to use correctly and hard to use incorrectly Item 19: Treat class design as type design Item 20: Prefer pass-by-reference-to-const to pass-by-value Item 21: Don't try to return a reference when you must return an object Item 22: Declare data members private Item 23: Prefer non-member non-friend functions to member functions Item 24: Declare non-member functions when type conversions should apply to all parameters Item 25: Consider support for a non-throwing swap Chapter 5. Implementations Item 26: Postpone variable definitions as long as possible. Page 2
ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html Item 27: Minimize casting. Item 28: Avoid returning "handles" to object internals. Item29: Strive for exception-safe code. Item 30: Understand the ins and outs of inlining. Item31: Minimize compilation dependencies between files. Chapter 6. Inheritance and Object-Oriented Design Item 32: Make sure public inheritance models "is-a." Item 33: Avoid hiding inherited names Item 34: Differentiate between inheritance of interface and inheritance of implementation Item 35: Consider alternatives to virtual functions Item 36: Never redefine an inherited non-virtual function Item 37: Never redefine a function's inherited default parameter value Item 38: Model "has-a" or "is-implemented-in-terms-of" through composition Item 39: Use private inheritance judiciously Item 40: Use multiple inheritance judiciously Chapter 7. Templates and Generic Programming Item 41: Understand implicit interfaces and compile-time polymorphism Item 42: Understand the two meanings of typename Item 43: Know how to access names in templatized base classes Item 44: Factor parameter-independent code out of templates Item 45: Use member function templates to accept "all compatible types." Item 46: Define non-member functions inside templates when type conversions are desired Item 47: Use traits classes for information about types Item 48: Be aware of template metaprogramming Chapter 8. Customizing new and delete Item 49: Understand the behavior of the new-handler Item 50: Understand when it makes sense to replace new and delete Item 51: Adhere to convention when writing new and delete Item 52: Write placement delete if you write placement new Chapter 9. Miscellany Item 53: Pay attention to compiler warnings. Item 54: Familiarize yourself with the standard library, including TR1 Item.55: Familiarize yourself with Boost. Appendix A. Beyond Effective C++ Appendix B. Item Mappings Between Second and Third Editions Index < Day Day Up > Page 3
###E###
ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html Rights and Contracts Department One Lake Street Upper Saddle River, NJ 07458 Text printed in the United States on recycled paper at Courier in Westford, Massachusetts.First printing, May 2005 Dedication For Nancy, without whom nothing would be much worth doing Wisdom and beauty form a very rare combination. ?Petronius Arbiter Satyricon, XCIV Dedication And in memory of Persephone, 1995?004 < Day Day Up > Page 5
ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html < Day Day Up > Praise for Effective C++, Third Edition "Scott Meyers' book, Effective C++, Third Edition, is distilled programming experience ?experience that you would otherwise have to learn the hard way. This book is a great resource that I recommend to everybody who writes C++ professionally." ? Peter Dulimov, ME, ngineer, Ranges and Assessing Unit, NAVSYSCOM, Australia "The third edition is still the best book on how to put all of the pieces of C++ together in an efficient, cohesive manner. If you claim to be a C++ programmer, you must read this book." ? Eric Nagler, Consultant, Instructor, and author of Learning C++ "The first edition of this book ranks among the small (very small) number of books that I credit with significantly elevating my skills as a 'professional' software devel-oper. Like the others, it was practical and easy to read, but loaded with important advice. Effective C++, Third Edition, continues that tradition. C++ is a very powerful programming language. If C gives you enough rope to hang yourself, C++ is a hard-ware store with lots of helpful people ready to tie knots for you. Mastering the points discussed in this book will definitely increase your ability to effectively use C++ and reduce your stress level." ? Jack W. Reeves, Chief Executive Officer, Bleading Edge Software Technologies "Every new developer joining my team has one assignment ?to read this book." ? Michael Lanzetta, Senior Software Engineer "I read the first edition of Effective C++ about nine years ago, and it immediately became my favorite book on C++. In my opinion, Effective C++, Third Edition, remains a must-read today for anyone who wishes to program effectively in C++. We would live in a better world if C++ programmers had to read this book before writing their first line of professional C++ code." ? Danny Rabbani, Software Development Engineer "I encountered the first edition of Scott Meyers' Effective C++ as a struggling programmer in the trenches, trying to get better at what I was doing. What a lifesaver! I found Meyers' advice was practical, useful, and effective, fulfilling the promise of the title 100 percent. The third edition brings the practical realities of using C++ in serious development projects right up to date, adding chapters on the language's very latest issues and features. I was delighted to still find myself learning something interesting and new from the latest edition of a book I already thought I knew well." ? Michael Topic, Technical Program Manager "From Scott Meyers, the guru of C++, this is the definitive guide for anyone who wants to use C++ safely and effectively, or is transitioning from any other OO language to C++. This book has valuable information presented in a clear, concise, entertaining, and insightful manner." ? Siddhartha Karan Singh, Software Developer "This should be the second book on C++ that any developer should read, after a general Page 6
ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html introductory text. It goes beyond the how and what of C++ to address the why and wherefore. It helped me go from knowing the syntax to understanding the philosophy of C++ programming." ? Timothy Knox, Software Developer "This is a fantastic update of a classic C++ text. Meyers covers a lot of new ground in this volume, and every serious C++ programmer should have a copy of this new edition." ? Jeffrey Somers, Game Programmer "Effective C++, Third Edition, covers the things you should be doing when writing code and does a terrific job of explaining why those things are important. Think of it as best practices for writing C++." ? Jeff Scherpelz, Software Development Engineer "As C++ embraces change, Scott Meyers' Effective C++, Third Edition, soars to remain in perfect lock-step with the language. There are many fine introductory books on C++, but exactly one second book stands head and shoulders above the rest, and you're holding it. With Scott guiding the way, prepare to do some soaring of your own!" ? Leor Zolman, C++ Trainer and Pundit, BD Software "This book is a must-have for both C++ veterans and newbies. After you have finished reading it, it will not collect dust on your bookshelf ?you will refer to it all the time." ? Sam Lee, Software Developer "Reading this book transforms ordinary C++ programmers into expert C++ programmers, step-by-step, using 55 easy-to-read items, each describing one technique or tip." ? Jeffrey D. Oldham, Ph.D., Software Engineer, Google "Scott Meyers' Effective C++ books have long been required reading for new and experienced C++ programmers alike. This new edition, incorporating almost a decade's worth of C++ language development, is his most content-packed book yet. He does not merely describe the problems inherent in the language, but instead he provides unambiguous and easy-to-follow advice on how to avoid the pitfalls and write 'effective C++.' I expect every C++ programmer to have read it." ? Philipp K. Janert, Ph.D., Software Development Manager "Each previous edition of Effective C++ has been the must-have book for developers who have used C++ for a few months or a few years, long enough to stumble into the traps latent in this rich language. In this third edition, Scott Meyers extensively refreshes his sound advice for the modern world of new language and library features and the programming styles that have evolved to use them. Scott's engaging writing style makes it easy to assimilate his guidelines on your way to becoming an effective C++ developer." ? David Smallberg, Instructor, DevelopMentor; Lecturer, Computer Science, UCLA "Effective C++ has been completely updated for twenty-first-century C++ practice and can continue to claim to be the first second book for all C++ practitioners." ? Matthew Wilson, Ph.D., author of Imperfect C++ Page 7
ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html < Day Day Up > Page 8
分享到:
收藏