For a number of years, The Annotated C++ Reference Manual by Margaret Ellis and Bjarne Stroustrup (the “ARM”) functioned as a de facto standard for C++ while the official ANSI standard was under development. This appendix describes the most important differences between standard C++ and C++ as described in the ARM.
The following features are not described in the Annotated C++ Reference Manual. They are implemented in C++ as defined by the Standard and are implemented by the MIPSpro C++ compilers:
The dependent statement of an if, while, do-while, or for is considered to be a scope, and the restriction on having such a dependent statement be a declaration is removed.
The expression tested in an if, while, do-while, or for, as the first operand of a ? operator, or as an operand of the &&, ||, or ! operators may have a pointer-to-member type or a class type that can be converted to a pointer-to-member type in addition to the scalar cases permitted by the ARM.
Qualified names are allowed in elaborated type specifiers.
Use of a global-scope qualifier in member references of the form x.::A::B and p->::A::B is allowed.
The precedence of the third operand of the ? operator is changed.
If control reaches the end of the main() routine, and main() has an integral return type, it is treated as if a return 0; statement were executed.
Pointers to arrays with unknown bounds as parameter types are diagnosed as errors.
A functional-notation cast of the form A() can be used even if A is a class without a (nontrivial) constructor. The temporary created gets the same default initialization to zero as a static object of the class type.
A cast can be used to select one out of a set of overloaded functions when taking the address of a function.
Template friend declarations are permitted in class definitions and class template definitions.
Type template parameters are permitted to have default arguments.
Function templates may have non-type template parameters.
A reference to const volatile cannot be bound to an rvalue.
Qualification conversions, such as conversion from T** to T const * const * are allowed.
Static data member declarations can be used to declare member constants.
wchar_t is recognized as a keyword and a distinct type.
Run-time type identification (RTTI), including dynamic_cast and the typeid operator, is implemented.
Declarations in tested conditions (in if, switch, for, and while statements) are supported.
New-style casts (static_cast, reinterpret_cast, and const_cast) are implemented.
Definition of nested classes outside of the enclosing class is allowed.
mutable is accepted on non-static data member declarations.
Namespaces are implemented, including using declarations and directives. Access declarations are broadened to match the corresponding using declarations.
Explicit instantiation of templates is implemented.
The typename keyword is recognized.
explicit is accepted to declare non-converting constructors.
The scope of a variable declared in the for-init-statement of a for loop is the scope of the loop, not the surrounding scope.
Member templates are implemented.
The new specialization syntax (using template <>) is implemented.
cv-qualifiers (cv stands for const volatile) are retained on rvalues (in particular, on function return values).
The distinction between trivial and non-trivial constructors has been implemented, as has the distinction between POD (point of definition) constructs, such as, C-style structs, and non-PODs with trivial constructors.
The linkage specification is treated as part of the function type (affecting function overloading and implicit conversions).
A typedef name may be used in an explicit destructor call.
An array allocated via a placement new can be deallocated via delete.
enum types are considered to be non-integral types.
Partial specialization of class templates is implemented.