On Wed, 21 Nov 2012 12:02:45 -0000, Jack Applegame <jappleg...@gmail.com>
wrote:
void foo(ref int a) { a--; }
struct functor(A...) {
void function(A) functor;
}
functor!int f; // functor!(ref int) - wrong
f.functor = &foo; // Error: cannot implicitly convert expression (& foo)
of type void function(ref int a) to void function(int)
Hmm.. well I got past your initial problem, but I have a new one..
alias void function(ref int) funcType;
void foo(ref int a) { a--; }
struct functor(A...) {
A func;
}
void main()
{
functor!funcType f;
f.func = &foo; //Error: f.func is not an lvalue
}
--
Using Opera's revolutionary email client: http://www.opera.com/mail/