version(D_Version2)
Bill Baxter
dnewsgroup at billbaxter.com
Wed Mar 12 01:56:49 PDT 2008
Derek Parnell wrote:
> I just want to lodge a formal complaint.
>
> The implementation of version(D_Version2) that insists that code in its
> scope must be valid version 1 (one) code is a true PITA.
>
> <rant rating="venomous">
> Almost without exception, I'm finding that I have to use the string mixin
> idiom. Using that idiom excessively is bad coding form, IMNSHO.
>
> Having to constantly use
>
> version(D_Version2) {
> mixin(` ... version 2 specific code ... `);
> }
>
> is NOT A GOOD SIGN !!!!
>
> </rant>
I just resorted to this in something I was doing the other day:
> gcc -C -E -xc file_in.d | sed -e "s/^#/#line/" > file.d
> dmd file.d
It could solve your problem too. :-)
--bb
More information about the Digitalmars-d
mailing list