This is the mail archive of the egcs-bugs@egcs.cygnus.com mailing list for the EGCS project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Class with pointer to function conversion operator


Works fine for me:

$ cat > good.egcs.cpp
typedef void (*FP)();
struct C {
        public:
                C(FP ap) : p(ap) { }
                operator FP() { return p; }
        private:
                FP p;
        };
void f () {
        }
int main () {
        C c(f);
        c();
        }

$ eg++ good.egcs.cpp
$ eg++ -v           
Reading specs from
/usr/local/util/packages/egcs-19990620/lib/gcc-lib/sparc-sun-solaris2.5/gcc-2.95/specs
gcc version gcc-2.95 19990620 (prerelease)

-- 

Valentin Bonnard

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]