Good examples of version() algebra in real code
Guillaume Piolat
first.last at spam.org
Sun May 21 19:09:04 UTC 2023
On Sunday, 21 May 2023 at 18:43:32 UTC, Dennis wrote:
>
> - have real problems with existing `version()` statements
> (besides 'it looks ugly')
>
No big problem, but sometimes you need to do:
version(X86)
version = AnyX86;
version(X86_64)
version = AnyX86;
or
version (OSX)
version = Darwin;
else version (iOS)
version = Darwin;
else version (TVOS)
version = Darwin;
else version (WatchOS)
version = Darwin;
or
version (D_InlineAsm_X86)
version = UseX86Assembly;
version (D_InlineAsm_X86_64)
version = UseX86Assembly;
and those are the only case I remember being a tiny bit annoyed
at `version`. I wouldn't use the above library solution to save
one import.
More information about the Digitalmars-d
mailing list