Home | Libraries | People | FAQ | More |
CXXD errors are preprocessor errors issue by the CXXD library using the preprocessor '#error' directive. These errors occur when the inclusion of a mod produces inconsistencies which CXXD does not allow. These inconsistencies can be found, in a TU, either the first time CXXD includes a particular CXXD header file or subsequent times CXXD includes a particular CXXD header. A number of these errors have previously been mentioned when discusssing CXXD consistency. They will be systematically explained here again.
The errors which can occur involve four different situations for which CXXD issues the "#error' directive. These situations are, for any given mod called 'xxx':
As previously stated in the documentation low-level mod implementation header files are processed each time they are included to avoid inconsistencies.
The first error listed above could happen either the first time a particular CXXD header is included or a subsequent time a particular CXXD header is included, since override macros could occur at any time in a TU. It is not possible to eliminate this error message for the situation in which it would occur, since conflicting CXXD override macros always means that CXXD cannot choose the correct dual library for a particular mod.
The second and third errors listed above can only happen at a subsequent time a particular mod is included, since either message occurs when an override macro changes the dual library choice from a previous inclusion of the CXXD header. It is not possible to eliminate this error message for the situation in which it would occur, since CXXD enforces consistency of the dual library chosen for a mod in all places in a TU.
The last error message can only occur the first time a particular mod is included, where an override macro for the C++ standard library fails because the library is not available. It is possible to eliminate this last error message for the situation in which it would occur. You can do this by defining the object-like macro CXXD_NO_CONFIG to nothing as in:
#define CXXD_NO_CONFIG
before including the particular mod. This object-like macro allows an override macro for the C++ standard library to choose the particular mod's C++ standard library equivalent as the dual library even when Boost.Config determines that the C++ standard library equivalent is not available when compiling the TU.
There are two reasons for allowing this object-macro to eliminate the particular preprocessor error message:
Eliminating this last of CXXD's preprocessor #error messages, and allowing a macro override to choose a particular mod's C++ standard equivalent dual library even when Boost Config says it does not exist, should very rarely ever be done.