On Thursday, 19 February 2015 at 01:39:19 UTC, Jonathan Marler
wrote:
On Wednesday, 18 February 2015 at 23:49:26 UTC, Adam D. Ruppe
wrote:
I'd write a foo_impl which always takes a parameter. Then do
the versioned foo() functions which just forward to it:
void foo_impl(int x) { long function u
On Wednesday, 18 February 2015 at 23:49:26 UTC, Adam D. Ruppe
wrote:
I'd write a foo_impl which always takes a parameter. Then do
the versioned foo() functions which just forward to it:
void foo_impl(int x) { long function using x here }
version(globals) {
int x;
void foo() {
foo_i
I'd write a foo_impl which always takes a parameter. Then do the
versioned foo() functions which just forward to it:
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 d
Does anyone know a good way to support versioned function
parameters? Say, in one version I want a variable to be a global
and in another I want it to be a parameter.
version(GlobalVersion)
{
int x;
void foo()
{
// A huge function that uses x
}
} else {
void foo(int