On Tuesday, 23 July 2013 at 20:13:33 UTC, John Colvin wrote:
To be honest, I wasn't expecting foo(*aptr) to compile at all, with a "taking address of temporary" error or similar.

But there are no temporaries here. You seem to mix concepts of "temporary" and "stack variable with deterministic lifetime". Taking address of a temporary is something like this:

int foo() { return 42; }
...
int* ptr = &(foo());

Reply via email to