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

Error: File DDB4270.C, Line 7
A pointer to member cannot be created from a parenthesized or unqualified name.
To successfully compile the code, remove the parentheses from the last line.
Example:
class A {
public:
int i;
static int (A::*p);
};
int (A::*(A::p)) = &A::i;
&qualified-id Required in Static Member Initialization List
In HP C++, you can use an unqualified function name in a static member initialization
list. In HP aC++, an unqualified function name in a static member initialization list
causes an error and the program does not compile. Use the unary operator & followed
by a qualified-id in the member initialization list. The resulting code compiles correctly
with HP C++ and HP aC++.
Example:
class A {
public:
int i;
int j();
static int (A::*p)();
};
int (A::*(A::p))() = j;
Compiling this code with HP aC++ generates the following error:
Error: File DDB4270A.C, Line 7
Cannot initialize int (A::*)() with int (*)().
To successfully compile with HP C++ and HP aC++, change the initialization list in line
7 to &A::j;
class A {
public:
int i;
int j();
static int (A::*p)();
};
int (A::*(A::p))() = &A::j;
Non-constant Reference Initialization
In HP C++, if you do not initialize a non-constant reference with an lvalue, an
anachronistic warning is issued and compilation continues. In HP aC++, an error is
issued if you do not use an lvalue for a non-constant reference initialization. Use an
lvalue for the reference initialization, or define the reference as a const type.
284 Migrating from HP C++ (cfront) to HP aC++