HP aC++/HP C A.06.25 Programmer's Guide

template class BaseT {
public:
T t;
int i;
};
template class DerivedT : public BaseT {
public:
void foo1 () { t = 1; i = 1; } // warning 721
// t and i could be global.
void foo2 () { this->t = 2; this->i = 2; } // Correct syntax, no warning.
};
DerivedT d; // Here is the point of instantiation.
Tokens after #endif
In HP C++, any character that follows the #endif preprocessor statement causes a
warning and is ignored. In HP aC++, characters following the #endif preprocessor
statement cause an error and the program does not compile. To change this, remove
all characters following all #endif preprocessor statements or put the token in
comments.
Example:
Compiling the following code with HP C++ causes a warning. Compiling with HP aC++
generates an error.
int main(){
#ifdef FLAG
int i;
i=1;
#endif FLAG
}
To compile with HP aC++, change the code to:
int main(){
#ifdef FLAG
int i;
i=1;
#endif //FLAG
}
overload not a Keyword
In HP C++, using the overload keyword to specify a function as an overloaded function
causes an anachronistic warning and is ignored. In HP aC++, using the overload
keyword causes an error and the program does not compile. To change this, remove
all occurrences of the overload keyword.
Example:
Compiling the following code with HP C++ causes a warning. Compiling with HP aC++
generates an error stating that overload is used as a type, but has not been defined as
a type.
280 Migrating from HP C++ (cfront) to HP aC++