On 08/23/2012 11:47 PM, Jacob Carlborg wrote:
How about this:
import std.stdio;
class Foo
{
auto forward (alias fn, Args...) (Args args)
{
return fn(args);
}
void bar (int a = 3)
{
writeln("bar ", a);
}
}
auto call (alias fn, T, Args...) (T t,
On 2012-08-23 21:51, Ellery Newcomer wrote:
if I have a member function alias and corresponding object and
arguments, is there any way to turn them into a member function call?
e.g.
class X{
void a();
}
auto profit(alias fn, T, Args...)(T t, Args args) {
???
}
profit!(X.fn, X)(x);
Const
if I have a member function alias and corresponding object and
arguments, is there any way to turn them into a member function call?
e.g.
class X{
void a();
}
auto profit(alias fn, T, Args...)(T t, Args args) {
???
}
profit!(X.fn, X)(x);
Constraints are:
1) must conserve ability to omit