Version Identifiers for Platforms / Architectures not supported byDMD

Jonathan M Davis jmdavisProg at gmx.com
Wed Nov 9 20:28:08 PST 2011


On Thursday, November 10, 2011 04:07:43 kennytm wrote:
> Perhaps DMD should generate a warning if a version of platforms does not
> have an else clause or that version's else clause's content is not another
> version statement or a static assert.

Well, that does get a bit fuzzy. For instance, rather than duplicating that 
else clause all over the place in std.file, only the first static if-else clause 
has the else with the static assert in it. All of the others just have the 
branches that work and don't have an else clause. If we were to require that 
there be an else like that, then std.file wouldn't compile. And while it 
wouldn't be all that bad to have to put an else on all of those static-ifs, it 
_would_ result in unnecessary code duplication.

- Jonathan M Davis


More information about the Digitalmars-d mailing list