void foo_impl(int x) { long function using x here }
version(globals) { int x; void foo() { foo_impl(x); } } else { void foo(int x) { foo_impl(x); } } Minimal duplication with both interfaces.
Adam D. Ruppe via Digitalmars-d-learn Wed, 18 Feb 2015 15:51:06 -0800
void foo_impl(int x) { long function using x here }
version(globals) { int x; void foo() { foo_impl(x); } } else { void foo(int x) { foo_impl(x); } } Minimal duplication with both interfaces.