-
Notifications
You must be signed in to change notification settings - Fork 160
C++ Language
When the commercial Watcom C++ compiler was first released as open source it was significantly
behind in the area of standards conformance. The C++ project has evolved the compiler (and its
libraries) considerably since then, but much work remains. It is our, admittedly ambitious,
intention to bring the C++ compiler (and library) into full conformance with the C++ 2011
standard. By skipping over the 1998 and 2003 standards we avoid having to worry about supporting
those standards as distinct entities and we can use C++ 2011 features unconditionally in the
library implementation (for example type_traits
).
Here we document unimplemented language features to chart the progress towards C++ 2011 conformance. We break the work on standards conformance into the following sections. Information about the C++ library is in a separate document.
At this time Open Watcom lacks several major C++ 2011 features. This includes (but is not limited to):
- Rvalue references and associated features (move constructors, etc).
- Varadic templates.
- Uniform initialization syntax.
- new-style
for
loops. - Lambda expressions.
- Type inference via
auto
. - Most other C++ 2011 specific features.
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 descending order of priority.
- Explicit template arguments for template functions.
- Out-of-line member templates
- Only members of a class template that are used should be instantiated (lazy instantiation).
- Using "typename" to specify that a dependent name is a type (support incomplete).
- Template friends.
- Template template parameters.
- Two phase lookup.
- Using "template" to specify that a dependent name is a template.
- Template function default arguments.
- Exported templates (will not implement).
Very few C++ compilers ever supported export
and many believe that its inclusion in the 1998
C++ standard was a mistake. The feature has been removed from the C++ 2011 standard, and we have
no plans to support it.
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
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.
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.
- Welcome
- Building
- Open Watcom Documentation
- Notes
- Relicensing effort
- Debugging
- OW tools usage Overview
- OW tools usage with CMake
- OW tools usage with Visual Studio Code
- Open Watcom 1.9 Wiki
OW Development
WGML Development
- WGML
- Augmented Devices
- Binary Device Files
- Common File Blocks
- COP Files
- Device File Blocks
- Device Function Language
- Device Function Notes
- Device Functions
- Directory File Format
- Drawing Boxes
- Driver File Blocks
- File and Directory Names
- Font File Blocks
- Fonts
- GML Tag Notes
- Keyword Statistics
- Macros and User Defined Tags
- Meta Data
- Page Layout Subsystem
- Search Paths
- Sequencing
- System Symbol Notes
- Tabs and Tabbing
- whpcvt Utility interaction