Compliance with Draft Standard C++



Syntax/Semantic Features    The Draft Standard    Contact KAI
Class Library Features      Technical Support

December 1996 Draft Standard Compliance

KAI C++ is extremely close to the December 1996 version of the draft standard. This document lists all know places where KAI C++ deviates from the December 1996 draft standard.

If you encounter other deviations from the December 1996 draft standard, please let us know!


Syntax/Semantic Features

These elements of the language syntax or semantics are not implemented in KAI C++ version 3.2.

  1. Wide char is not supported on most platforms.

  2. Type long double is not supported on most platforms.

  3. It is not possible to overload operators using functions that take enum types and no class types.

  4. The new lookup rules for member references of the form x.A::B and p->A::B are not yet implemented.

  5. enum types cannot contain values larger than can be contained in an int.

  6. reinterpret_cast does not allow casting a pointer to member of one class to a pointer to member of another class if the classes are unrelated.

  7. Explicit qualification of template functions is not implemented.

  8. Name binding in templates in the style of N0288/93-0081 is not implemented.

  9. In a reference of the form f()->g(), with g a static member function, f() is not evaluated. This is as required by the ARM. The WP, however, requires that f() be evaluated.

  10. Class name injection is not implemented.

  11. Putting a try/catch around the initializers and body of a constructor is not implemented.

  12. The notation :: template (and ->template, etc.) is not implemented.

  13. Template template parameters are not implemented.

  14. Koenig lookup of function names on all calls is not implemented.

  15. Finding friend functions of the argument class types on name lookup on the function name in calls is not implemented.


Class Library Features

These elements of the standard class library re not implemented in KAI C++ version 3.2.

  1. The current version of the front-end does not support explicit qualification of template arguments. For template functions that require this feature to implement the standard, an extra parameter is added to the function. (E.g. use_facet(), has_facet(), get_temporary_buffer())

  2. cctype header - Many implementations of ctype.h use macros to implement the functions. Functions are provided so their address can be taken, but if the use looks like a call, the macro is used. Since the functions must be in the std namespace, we need to undefine the macros. This causes a loss of performance.

  3. cstring header - The December 1996 draft standard redefines many of the function signatures. The main change is that there are now const char * and char * versions. The return type of the const char * version is const char * in C++, but in C it is char *. The additional const has not been added.

  4. cmath header -- The December 1996 draft standard adds overloaded versions of the standard C functions. Some are missing.

  5. The template for queue has an extra parameter for the allocator. In the December 1996 draft standard, the allocator from the container is used. This would only affect users who defined a different allocator for queue's container. To work around the problem, they must use the allocator to declare the queue type. The extra parameter will eventually be removed from the library.

  6. The December 1996 draft standard specifies that the templates for basic_stringbuf, basic_istringstream, basic_ostringstream and basic_stringstream should take a third parameter to specify the allocator. At this time they only take two parameters, the character type and a char_traits type.

  7. The return type of valarray logical operators && and || should be valarray<bool>, but are currently the same type as their parameters.

  8. memory header - The allocator::deallocate method is overloaded, one (non-standard) takes one parameter and the other (standard) takes two parameters. The non-standard method is not protected by the --strict command line option. It is available even in strict mode.


Copyright © 1997. All rights reserved.