The Cpp Language
From Open Watcom
This page documents some (not all) areas in which the C++ compiler is known to be standards deficient. This page does not consider library related issues. Don't report bugs about these problems. The features presented here aren't broken; just missing. Note that the information presented here is very incomplete right now.
Templates
The current C++ compiler is lacking in several important (and also not so important) template features. The following list shows some of these missing features sorted in approximate decending order of importance.
| missing feature | dependancy | plan of action |
|---|---|---|
| Explicit template arguments for template functions | work in progress | |
| Only members of a class template that are used should be instantiated | work in progress | |
| Out-of-line member templates | work in progress | |
| Using "typename" to specify that a dependent name is a type (support incomplete) | work in progress | |
| Template friends | ||
| Template template parameters | ||
| Two phase lookup | ||
| Using "template" to specify that a dependent name is a template | work in progress | |
| template function default arguments | work in progress | |
| Exported templates |
Note that very few C++ compilers support export and many believe that its inclusion in the C++ standard is a mistake. While the Open Watcom C++ project intends to update the compiler to conform with the C++ standard, there are no plans to support the controversial export feature in the forseeable future.
operator new
Open Watcom C++ currently follows the pre-standard practice of returning a null pointer if operator new fails to find the necessary memory. In Standard C++ operator new should throw a std::bad_alloc exception in such a case. In fact, the necessary exception is defined in the recent Open Watcom C++ library headers. This definition exists in part to pave the way for updating the library implementation but also to allow programs that mention std::bad_alloc to compile without error.
Some environments, in particular embedded systems, are very sensitive to issues of library overhead. Users developing code for these environments may wish to retain the option of having operator new return a null pointer in order to avoid the overhead of exception handling in their programs. Although the C++ standard library needs exception support in order to conform properly to the standard's requirements, embedded systems developers might be willing to avoid using the standard library even while still wanting support for dynamic memory allocation.
Argument Dependent Lookup
The C++ standard requires that functions (including operator functions) be looked up in the name space of their arguments if they can't otherwise be located using simplier look up rules. This behavior is called "argument dependent lookup" (ADL). Open Watcom C++ currently implements only a limited form of ADL. In particular Open Watcom C++'s version of ADL only applies to operator functions and then only to the name space of the function's first argument. Full support for standard ADL rules needs to be added.

