On Sunday, 25 June 2017 at 15:58:48 UTC, Johan Engelen wrote:
In C, you could do something like: ``` #if X void foo() {......} #else #define foo() #endif ```
Curious no one has mentionned it. Just use alias. version(X) alias myFunc = impl1; else alias myFunc = impl2;I do it a lot for ldc.intrinsics else they don't provide speed benefits, often not being inlined.