- Joined
- Oct 11, 2008
- Messages
- 1
- Reaction score
- 0
Hi, I've inherited the following C++ code, originally written in the late 1990s, that compiles w/o error on Sun Solaris 5.8 with SUNWspro 4.2 CC. When this same code is compiled with a recent version of g++, however, all 5 of the signatures for 'operator()' are flagged as "ERROR:ISO C++ forbids declaration of 'operator()' with no type".
Any suggestion on how to change the 'operator()' signatures to be complliant with ISO C++?
Thanks!
class FunctionPtrETK;
typedef (FunctionPtrETK::*FP_ETK)(...);
class FunctionPtrETK
{
private:
void *arg1;
void *arg2;
void *arg3;
public:
FP_ETK func;
FunctionPtrETK *object;
FunctionPtrETK(void*, ...);
FunctionPtrETK();
//next 5 lines: ERROR: ISO C++ forbids declaration of `operator()' with no type
operator() ();
operator() (void *);
operator() (void *, void *);
operator() (void *, void *, void *);
operator() (void *, void *, void *, void *);
FunctionPtrETK* convert(void*, ...);
static FunctionPtrETK ptr;
};
Any suggestion on how to change the 'operator()' signatures to be complliant with ISO C++?
Thanks!
class FunctionPtrETK;
typedef (FunctionPtrETK::*FP_ETK)(...);
class FunctionPtrETK
{
private:
void *arg1;
void *arg2;
void *arg3;
public:
FP_ETK func;
FunctionPtrETK *object;
FunctionPtrETK(void*, ...);
FunctionPtrETK();
//next 5 lines: ERROR: ISO C++ forbids declaration of `operator()' with no type
operator() ();
operator() (void *);
operator() (void *, void *);
operator() (void *, void *, void *);
operator() (void *, void *, void *, void *);
FunctionPtrETK* convert(void*, ...);
static FunctionPtrETK ptr;
};