version: multiple conditions

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Sat Jun 13 18:51:38 PDT 2015


On 6/13/15 4:57 PM, bitwise wrote:
> What is the rationale for not allowing multiple version conditions?
>
> Example:
>
> version(iOS || Android) {
>      pthread_create(...)
> }
> else version(Win32) {
>      CreateThread(...)
> }
>
> I wasn't able to find the conversations on this.
>
> I heard rumors in DLearn that Walter was against this, but I'm wondering
> if the sentiment has changed at this point. Is there is any wiggle room
> for at least adding "||" so that code can be shared between platforms?

No, it hasn't changed. Walter will not accept this, I don't think 
there's any hope for it.

Just use the static if trick.

-Steve


More information about the Digitalmars-d mailing list