www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.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