OR in version conditional compilation

MoonlightSentinel moonlightsentinel at disroot.org
Wed Mar 18 18:24:53 UTC 2020


On Wednesday, 18 March 2020 at 16:23:26 UTC, IGotD- wrote:
> you get the idea. So is this possible at all or do you have to 
> duplicate the code for each version identifier despite they are 
> equal for many version identifiers?

The usual workaround is to define a common version, e.g.

version(X86)
     version = X86_ANY
version(X86_64)
     version = X86_ANY

version(X86_ANY)
{
// your code here
}


More information about the Digitalmars-d-learn mailing list