HP aC++ A.03.85 Release Notes

HP aC++ Release Notes
Problem Descriptions and Fixes, and Known Limitations
Chapter 174
Incompatibilities Between Standard C++ Library Version 1.2.1 and the Draft
Standard
As the ANSI C++ standard has evolved over time, the Standard C++ Library has not always
kept up. Such is the case for the times function object in the functional header file. In the
standard, times has been renamed to multiplies.
If you want to use multiplies in your code, to be compatible with the ISO/ANSI C++
standard, use a conditional compilation flag on the aCC command line. For example, for the
following program, compile with the command line:
aCC -D__HPACC_USING_MULTIPLIES_IN_FUNCTIONAL test.c
// test.c
int times; //user defined variable
#include <functional>
// multiplies can be used in
int main() {}
// end of test.c
Depending on the existence of the conditional compilation flag, functional defines either
times, or multiplies, not both. If you have old source that uses times in header functional
and also new sources that use multiplies, the sources cannot be mixed.
Mixing the two sources would constitute a non-conforming program, and the old and new
sources may or may not link. If your code uses the old name times, and you want to continue
to use the now non-standard times function object, you do not need to do change the old
source to compile it.
Changes to the math.h System Header File
At the HP-UX 11.00/11i release, the math.h header file has changed in the following ways:
fmax and fmin are new functions. If you have used these function names in your code in a
prior release and want to continue using them, you must rename your functions. If this is
a problem in your code, you will see the following error:
The overloading mechanism cannot tell a double (double , double ) from
a ... (1103)
•The _ABS function has been renamed. To continue using this function, replace any call to
_ABS() with abs().