[Issue 7417] One-definition rule for version specification - allow version expressions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jun 10 18:57:52 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=7417
--- Comment #11 from anonymous4 <dfj1esp02 at sneakemail.com> ---
Minimal implementation with static opDispatch:
---
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-bugs
mailing list