C++ 特性发展
目录

1. C with Classes

The features provided in the initial 1980 implementation can be summarized:

  • Classes
  • Derived classes (but no virtual functions yet)
  • Public/private access control
  • Constructors and destructors
  • Call and return functions (later removed)
  • friend classes
  • Type checking and conversion of function arguments

During 1981, three more features were added:

  • Inline functions
  • Default arguments
  • Overloading of the assignment operator

2. The Birth of C++

The major additions to C with Classes introduced to produce C++ were:

  • Virtual functions
  • Function name and operator overloading
  • References
  • Constants
  • User-controlled free-store memory control
  • Improved type checking

3. Chronology 1985 - 1993

The main features of 2.0 were first presented in [Stroustrup, 1987c] and summarized in the revised version of that paper [Stroustrup, 1989b] that accompanied 2.0 as part of its documentation:

  • Multiple inheritance
  • Type-safe linkage
  • Better resolution of overloaded functions
  • Recursive definition of assignment and initialization
  • Better facilities for user-defined memory management
  • Abstract classes
  • Static member functions
  • const member functions
  • protected members (first provided in Release 1.2)
  • Generalized initializers
  • Base and member initializers
  • Overloading of operator ->
  • Pointers to members (first provided in Release 1.2)

4. 1994-2005

发表评论