Accelerated C++: Practical Programming by Example, Andrew Koenig and Rules, Guidelines, and Best Practices, Herb Sutter and Andrei Alexandrescu. Consistent, high-quality coding standards improve software quality, reduce time- to-market, promote teamwork, eliminate by Andrei Alexandrescu, Herb Sutter. Consistent, high-quality coding standards improve software quality, reduce time- to-market, promote teamwork, eliminate time wasted on inconsequential matters .
|Published (Last):||2 October 2016|
|PDF File Size:||12.55 Mb|
|ePub File Size:||10.24 Mb|
|Price:||Free* [*Free Regsitration Required]|
Don’t use C-style casts. Keep types and functions in separate namespaces unless they’re specifically intended to work together. Prefer minimal classes to monolithic classes. If you provide any class-specific new, provide all of the standard forms plain, in-place, standqrds nothrow.
C++ Coding Standards: Rules, Guidelines, and Best Practices [Book]
Don’t sweat the small stuff. Destructors, deallocation, and swap never fail Algorithms; and Type Safety. What are the elements of a rational error handling policy?
Use a version control system. Prefer function objects over functions as algorithm and comparer arguments.
Inherit, not to reuse, but to be reused. Make header files self-sufficient.
Chronicle Volume 1 Inbunden. Throw by value, catch by reference This product is part of the following series.
Declare variables as locally as possible Class Design and Inheritance. Preserve natural semantics for overloaded operators. Prefer composition to inheritance. Coding standards have many advantages: Don’t use invalid objects.
C++ Coding Standards: 101 Rules, Guidelines, and Best Practices
Prefer function objects over functions as algorithm and comparer arguments Avoid inheriting from classes that were not designed to be base classes. Each standard is described concisely, with practical examples.
Avoid casting away const Use vector by default. Series This product is part of the following series.
Prefer to use exceptions to report errors Ensure resources are owned by objects. Prefer writing nonmember nonfriend functions. Know what not to standardize. Prefer the canonical forms of arithmetic and assignment operators Destructors, deallocation, and swap never fail. About the Author s. Use an automated build system. Error Handling and Exceptions.