www.digitalmars.com         C & C++   DMDScript  

c++ - bug with #defines in constructors

Hi!

Sorry if it's not the place to post bugreports for the dmc compiler (haven't
found any before). I find the following behaviour strange and I think it's a
bug:

Compile this:


class X{ X(); };

X::X
#if 0
()
#else
()
#endif
{}


And you get "Error: 'X' is not a member of struct 'X'". It compiles with gcc.
I'm using dmc version 8.42n on windows.

Sorry if it's something I'm doing wrong.

Cheers,

Daniel
Jun 22 2006