equivariant functions

Christian Kamm kamm-incasoftware at removethis.de
Mon Oct 13 00:12:11 PDT 2008


Can you, given an alias to a function that uses this equivariance, create a
forwarder function with the exact same behaviour? I.e. will calls to

typeof(return) identity(alias fn)(ParameterTuple!(fn) args) {
  return fn(args);
}

or similar work exactly as calls to fn, even though typeof(return) has to be
more than just a type? The parameter storage classes ref, out, lazy already
make this kind of forwarding very tricky to do right (I think you have to
escape to mixins) and I fear this'll make it even more involved.



More information about the Digitalmars-d mailing list