Organization: Telecom Research Labs, Melbourne, Australia
Date: Wed, 13 Jan 1993 05:40:55 GMT
Lines: 53
Earlier I posted a problem regarding a possible bug with C++ 3.01
templates, in which the following compiler error occurs.
---
"/usr/users/lightw/IN/src/SMS/mgmt/a.c", line 25: error: bad argument 1 type for GetFunc <x, int >::GetFunc__pt__4_1xi(): int (x::*)() ( int (x::*)() expected)
---
I have received several mail replies indicating that this is a bug in
cfront 3.01!!! They said that it is fixed in cfront 3.0.2. Is this
available?
I have also been told that the problem extends to other uses of function
pointers inside template classes. For example, assining such a pointer to
0.
Thanks to all those who have replied.
P.S. Here is the reprint of the code which causes the bug.
-----------------------------
class x
{
public:
int x_int() { return 21; }
// fff is a member function of class x which returns an
// integer
};
int ft()
{
return 22;
}
template <class A,class B> class GetFunc {
public:
B (A::*a_b_func)();
// func contains address of a member function of class B
// (e.g. class x) which returns an A (e.g. an int)