Re: Ref function pointers?

2011-01-07 Thread Simen kjaeraas
Steven Schveighoffer wrote: On Thu, 06 Jan 2011 22:37:07 -0500, Sean Eskapp wrote: Is there a way to create a function pointer which returns a reference? In all the ways I've tried it, my return value becomes "not an lvalue". int x; ref int foo() { return x; } void main() {

Re: Ref function pointers?

2011-01-07 Thread Steven Schveighoffer
On Thu, 06 Jan 2011 22:37:07 -0500, Sean Eskapp wrote: Is there a way to create a function pointer which returns a reference? In all the ways I've tried it, my return value becomes "not an lvalue". int x; ref int foo() { return x; } void main() { auto func = &foo; pragma(msg

Ref function pointers?

2011-01-06 Thread Sean Eskapp
Is there a way to create a function pointer which returns a reference? In all the ways I've tried it, my return value becomes "not an lvalue".