Regression with pmfs??
Theodore Papadopoulo
Theodore.Papadopoulo@sophia.inria.fr
Tue Oct 27 11:04:00 GMT 1998
> [...]
> and your example compiles as well, if modified accordingly:
>
> class A {
> public:
> A() { }
> ~A() { }
> const double A1() const { return 1.0; }
> const double A2() const { return 2.0; }
> };
>
> class B: public A {
> public:
>
> B() { }
> ~B() { }
> double R(const int) const;
> };
>
> double
> B::R(const int i) const
> {
> typedef const double (B::*Func)() const;
> const Func D1 = &B::A1;
> const Func D2 = &B::A2;
> const Func DD = (i==2) ? &B::A1: &B::A2;
> return (this->*DD)();
> }
>
> This is with GNU C++ version egcs-2.92.17 19981026.
OK, my tests were with egcs-2.92.16 19981022. I'll give a try
to a newer version.
Thank's a lot.
Theo.
--------------------------------------------------------------------
Theodore Papadopoulo
Email: Theodore.Papadopoulo@sophia.inria.fr Tel: (33) 04 92 38 76 01
--------------------------------------------------------------------
More information about the Gcc-bugs
mailing list