On Tuesday, 31 July 2018 at 21:29:26 UTC, Jean-Louis Leroy wrote:
How do I declare a variable that contains a pointer to a
function returning a reference?
import std.stdio;
int foo(return ref int a)
{
a = 42;
return a;
}
ref int bar(return ref int a)
{
a = 42;
On Tuesday, 31 July 2018 at 21:29:26 UTC, Jean-Louis Leroy wrote:
How do I declare a variable that contains a pointer to a
function returning a reference?
import std.stdio;
int foo(return ref int a)
{
a = 42;
return a;
}
ref int bar(return ref int a)
{
a = 42;
How do I declare a variable that contains a pointer to a function
returning a reference?
import std.stdio;
int foo(return ref int a)
{
a = 42;
return a;
}
ref int bar(return ref int a)
{
a = 42;
return a;
}
void main()
{
int x;
auto apf =