When I try to compile a non-member operator ->* g++ tells me that
pmv.C:3: error: 'int& operator->*(s*, int s::*)' must have an argument of class
or enumerated type
but the only place where the standard mentions the argument types of ->* is in
13.6ยง11 and there it is stated
...there exist candidate operator functions of the form
CV12 T & operator->*(CV1 C1 *, CV2 T C2 ::*);
and thus I think this is a bug.
--
Summary: Argument type of non-member operator->*
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc at magfr dot user dot lysator dot liu dot se
GCC build triplet: i586-pc-linux-gnu
GCC host triplet: i586-pc-linux-gnu
GCC target triplet: i586-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35929