version(number) is completely useless
Kagamin
spam at here.lot
Wed Jul 20 18:27:49 UTC 2022
On Wednesday, 20 July 2022 at 01:34:00 UTC, Steven Schveighoffer
wrote:
> The thing I miss the most for versions is a `version1 or
> version2` mechanism.
You can already do it:
```
struct Version
{
template opDispatch(string s)
{
mixin(`version(`~s~`)enum opDispatch=true;else enum
opDispatch=false;`);
}
}
static if(Version.OSX || Version.linux){}
else{}
```
More information about the Digitalmars-d
mailing list