From: spuler@coral.cs.jcu.edu.au (David Spuler)
Subject: List of features of C++ versions
Organization: James Cook University
Date: 14 Dec 92 23:42:49 GMT


  [Sorry if this is a duplicate post. We seem to have local problems]

I've been trying to compile a list of the various features added by the
different version numbers in the definition of the C++ language.
My list so far is below.. any additions, corrections are welcomed.
Some of the entries are prefixed with ?? -  are these entries correct?

I've built this list from a number of sources including:

Stroustrup, 1st edition
Stroustrup, 2nd edition
Ellis & Stroustrup, ARM
comp.lang.c++ FAQ


1.1 changes
===========
pointers to class members added
protected keyword added
?? private keyword added   (private isn't listed in Stroustrup 1st edn)

 
1.2 changes 
===========
ability to overload based on unsigned long/int

  
2.0 changes (1989??)
-----------
   <iostream.h> added to supercede <stream.h>
   multiple inheritance
   name of base class in constructor list, even for single inheritance 
   virtual base classes added
   type-safe linkage added
   overload made obsolete, but still supported
   new function matching rules - some changes
   ?? address of overloaded function
   long names - 31 char limit problem fixed in Cfront 2.0
   abstract classes and pure virtual functions - support added for, explicit support for the =0 syntax
   memberwise copying for op= and copy constructor
   overload new and delete on class basis (assignment to this made obsolete)
   ?? overloading global new/delete made obsolete?
   placement specifier for new operator (added in 2.0 ??)
   explicit destructor calls (added in 2.0 ??)
   new operators to overload:  comma operator, -> , ->+ operator
   pointers to members use clarified, and new operators added: .* and ->*
   const/volatile member fns added
   static member fns added
   __cplusplus   ?? added in 2.0??
   non-constant expression initializers allowed for static/global objects
   initialization of static data members & static class members - explicit support for;  initializers allowed for static class members
   data objects can be volatile  (also in ANSI C) ?? added in 2.0?
   initialization of automatic aggregates allowed (although not actually disallowed pre-2.0, many didn't support it)
   ?? exceptions added partially? e.g.  the "catch" keyword reserved for future use
   enum declarations local to classes - can be private/protected
   anonymous unions at file scope must be static
   default args can't be declared twice, even if same values (must be in first declaration/definition)
   default args can be unrestricted expression - previously had to be constant expressions
   virtual fns allowed to be redefined in derived class as different prototype (different parameter types)
   ?? error if new derived virtual fns differs only by return value type
   global object initialization - order of appearance in each file (but no cross-file order specified)
   char constants have type char ?? added 2.0

2.1 changes
-----------
	class-local declarations - enum/class/typedef
	delete[] notation (don't need the size)
	constructors with all arguments having default arguments are now
		called as if they were the default (zero argument) constructor
	objects in conditional statement blocks are local to the block, not
		to the statement:  if(..) { int i; }  else {int i; // now ok
	overloading can distinguish prefix/postfix -- and ++
	pure virtual member functions implicitly inherited as pure virtual
	constructor notation for intrinsic types: int i(20);  char *p("adfds");
	unions can contain access specifiers

3.0 changes
-----------
	multiple inheritance
	templates
	exceptions (not yet!)
	protected base classes       class A : protected B { ..};
	fully nested classes
	virtual base class dominance  p592 Lippman
        ?? initialization of single dimension array of class objects with constructors taking all default arguments (source: C++ FAQ)
        ?? use of operators &&, ||, ?: with expressions requiring temporaries of class objects containing destructors (source: C++ FAQ)
        ?? implicit named return values  (source: C++ FAQ)