pure virtual destructor declared inline

Richard Smith rgs26@cam.ac.uk
Fri Nov 22 13:09:00 GMT 2002


Hi,

g++ 2.95.4 chokes on the following:

class foo
{
  virtual ~foo() = 0 {}
};

although it's valid C++, as far as I can tell. This is known to work on MSVC++ 
version 6's compiler.

I'm running a stock install from Debian's unstable (sid) distro.
The error given is:
test.cpp:3: parse error before `{'

Is this a compiler bug?

Thanks,
Richard.



More information about the Gcc-bugs mailing list