"Effective C + +" directory:

Source: Internet
Author: User

Directory

Article 1: Treat C + + as a language federal

Clause 2: Replace # define with const, enum, inline as possible

Clause 3: Use const whenever possible

Article 4: Determine if object is initialized before use

Article 5: Understand what functions are written and called by C + + by default

Article 6: If you do not want to use the compiler automatically generated functions, you should explicitly deny

Article 7: Declaring a virtual destructor for a polymorphic base class

Article 8: Don't let exceptions escape destructors

Article 9: Never call the virtual function in the construction and destruction process

Clause 10: Make operator= return a reference to *this

Article 11: Implementing "self-assignment" in operator=

Article 12: Do not forget each part of the object when copying it

Article 13: Managing Resources with objects

Article 14: Beware of coping behavior in resource management classes

Article 15: Provide access to the original resource in the resource management class

Article 16: Paired use new and delete to take the same form

Article 17: Placing a Newed object into a smart pointer with a standalone statement

Article 18: Make the interface easy to use correctly, not easy to misuse

Article 19: Design class like design type

Clause 20: Prefer to replace pass-by-value with Pass-by-reference-to-const

Clause 21: When you must return an object, don't be paranoid about returning it reference

Article 22: Declaring a member variable as private

Clause 23: Prefer to replace the member function with Non-member and non-friend

Clause 24: If all parameters require type conversion, use the Non-member function for this

Article 25: Consider writing out a swap function that does not throw an exception

Clause 26: Delay the occurrence of variable definitions whenever possible

Clause 27: Try to do less transformational action

Clause 28: Avoid returning handles points to the inner component of the object

Article 29: It is worthwhile to work for "exceptional safety"

Article 30: A thorough understanding of the inside and outside of inlining

Article 31: Minimize compilation dependencies between files

Clause 32: Determine your public inheritance mold out is-a relationship

Article 33: Avoid hiding the inherited name

Article 34: Differentiating between interface inheritance and implementation inheritance

Article 35: Consider alternatives other than the virtual function

Article 36: Never redefine inherited non-virtual functions

Article 37: Never redefine inherited default parameter values

Article 38: has-a or "according to something" through a composite mold tree

Clause 39: Judicious and prudent use of private inheritance

Article 40: Judicious and prudent use of multiple inheritance

Article 41: Understanding implicit interfaces and compile-time polymorphism

Article 42: Understanding the dual meaning of TypeName

Article 43: Learning to handle names within a templated base class

Article 44: Extracting parameter-independent code from templates

Article 45: Use the member function template to accept all compatible types

Clause 46: Define a non-member function for a template when a type conversion is required

Article 47: Please use traits class performance type information

Article 48: Understanding Template meta-programming

Article 49: Understanding the behavior of New-handler

Article 50: Understanding the appropriate replacement time for new and delete

Article 51: To write new and delete when you need to adhere to the general

Clause 52: Write placement new also to write placement delete

Article 53: Don't overlook compiler warnings

Article 54: Familiarize yourself with the standard library of programs including TR1

Article 55: Get familiar with boost

"Effective C + +" directory:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.