CodeCheck Documentation
CodeCheck Documentation - Effective C++

Standard: Effective C++

Checks based on the book "Effective C++ Third Edition: 55 Specific Ways to Improve Your Programs and Designs" by Scott Meyers

Amazon.com Purchase link: http://amzn.com/0321334876

“Every C++ professional needs a copy of Effective C++. It is an absolute must-read for anyone thinking of doing serious C++ development. If you’ve never read Effective C++ and you think you know everything about C++, think again.”
Steve Schirripa, Software Engineer, Google
“C++ and the C++ community have grown up in the last fifteen years, and the third edition of Effective C++ reflects this. The clear and precise style of the book is evidence of Scott’s deep insight and distinctive ability to impart knowledge.”
Gerhard Kreuzer, Research and Development Engineer, Siemens AG

The first two editions of Effective C++ were embraced by hundreds of thousands of programmers worldwide. The reason is clear: Scott Meyers’ practical approach to C++ describes the rules of thumb used by the experts — the things they almost always do or almost always avoid doing — to produce clear, correct, efficient code.

The book is organized around 55 specific guidelines, each of which describes a way to write better C++. Each is backed by concrete examples. For this third edition, more than half the content is new, including added chapters on managing resources and using templates. Topics from the second edition have been extensively revised to reflect modern design considerations, including exceptions, design patterns, and multithreading.

Important features of Effective C++ include:



From the Back Cover

“Every C++ professional needs a copy of Effective C++. It is an absolute must-read for anyone thinking of doing serious C++ development. If you’ve never read Effective C++ and you think you know everything about C++, think again.”
Steve Schirripa, Software Engineer, Google“C++ and the C++ community have grown up in the last fifteen years, and the third edition of Effective C++ reflects this. The clear and precise style of the book is evidence of Scott’s deep insight and distinctive ability to impart knowledge.”
Gerhard Kreuzer, Research and Development Engineer, Siemens AG

The first two editions of Effective C++ were embraced by hundreds of thousands of programmers worldwide. The reason is clear: Scott Meyers’ practical approach to C++ describes the rules of thumb used by the experts — the things they almost always do or almost always avoid doing — to produce clear, correct, efficient code.

The book is organized around 55 specific guidelines, each of which describes a way to write better C++. Each is backed by concrete examples. For this third edition, more than half the content is new, including added chapters on managing resources and using templates. Topics from the second edition have been extensively revised to reflect modern design considerations, including exceptions, design patterns, and multithreading.

Important features of Effective C++ include:

Check IDCheck NameSupported
EFFECTIVECPP_11. View C++ as a federation of languagesNo
EFFECTIVECPP_022. Do Not Use #defineYes
EFFECTIVECPP_033. Use Const whenever possibleYes
EFFECTIVECPP_044. Make sure that objects are initialized before they are usedYes
EFFECTIVECPP_55. Know what functions C++ silently writes and callsNo
EFFECTIVECPP_66. Explicitly disallow the use of compiler-generated functions you do not wantNo
EFFECTIVECPP_077. Non-Virtual Destructors in Base ClassesYes
EFFECTIVECPP_088. Exceptions in DestructorsYes
EFFECTIVECPP_099. Virtual Call in Constructor/DestructorYes
EFFECTIVECPP_1010. Assignment Operator Return ThisYes
EFFECTIVECPP_1111. Assignment Operator Self AssignmentYes
EFFECTIVECPP_1212. Copy all parts of an objectNo
EFFECTIVECPP_1313. Use objects to manage resourcesNo
EFFECTIVECPP_1414. Think carefully about copying behavior in resource-managing classesNo
EFFECTIVECPP_1515. Provide access to raw resources in resource-managing classesNo
EFFECTIVECPP_1616. Use the same form in corresponding uses of new and deleteYes
EFFECTIVECPP_1717. Store newed objects in smart pointers in standalone statementsYes
EFFECTIVECPP_1818. Make interfaces easy to use correctly and hard to use incorrectlyNo
EFFECTIVECPP_1919. Treat class design as type designNo
EFFECTIVECPP_2020. Prefer pass-by-reference-to-const to pass by valueYes
EFFECTIVECPP_2121. Dont try to return a reference when you must return an objectNo
EFFECTIVECPP_2222. Datamembers should be declared privateYes
EFFECTIVECPP_2323. Prefer non-member non-friend functions to member functionsNo
EFFECTIVECPP_2424. Declare non-member functions when type conversions should apply to all parametersNo
EFFECTIVECPP_2525. Consider support for a non-throwing swapNo
EFFECTIVECPP_2626. Postpone variable definitions as long as possibleYes
EFFECTIVECPP_2727. Minimize castingYes
EFFECTIVECPP_2828. Avoid returning “handles” to object internalsNo
EFFECTIVECPP_2929. Strive for exception-safe codeNo
EFFECTIVECPP_3030. Understand the ins and outs of inliningNo
EFFECTIVECPP_3131. Minimize compilation dependencies between filesNo
EFFECTIVECPP_3232. Make sure public inheritance models "is-a"No
EFFECTIVECPP_3333. Avoid hiding inherited namesYes
EFFECTIVECPP_3434. Differentiate between inheritance of interface and inheritance of implementationNo
EFFECTIVECPP_3535. Consider alternatives to virtual functionsYes
EFFECTIVECPP_3636. Never redefine an inherited non-virtual functionYes
EFFECTIVECPP_3737. Never redefine a (virtual) functions inherited default parameter valueNo
EFFECTIVECPP_3838. Model “has-a” or “is-implemented-in-terms-of” through compositionNo
EFFECTIVECPP_3939. Use private inheritance judiciouslyNo
EFFECTIVECPP_4040. Use multiple inheritance judiciouslyNo
EFFECTIVECPP_4141. Understand implicit interfaces and compile-time polymorphismNo
EFFECTIVECPP_4242. Understand the two meanings of typenameNo
EFFECTIVECPP_4343. Know how to access names in templatized base classesNo
EFFECTIVECPP_4444. Factor parameter-independent code out of templatesNo
EFFECTIVECPP_4545. Use member function templates to accept "all compatible types"No
EFFECTIVECPP_4646. Define non-member functions inside templates when type conversions are desiredNo
EFFECTIVECPP_4747. Use traits classes for information about typesNo
EFFECTIVECPP_4848. Be aware of template metaprogrammingNo
EFFECTIVECPP_4949. Understand the behavior of the new-handlerNo
EFFECTIVECPP_5050. Understand when it makes sense to replace new and deleteNo
EFFECTIVECPP_5151. Adhere to convention when writing new and deleteNo
EFFECTIVECPP_5252. Write placement delete if you write placement newNo
EFFECTIVECPP_5353. Pay attention to compiler warningsNo
EFFECTIVECPP_5454. Familiarize yourself with the standard library, including TR1No
EFFECTIVECPP_5555. Familiarize yourself with BoostNo