The simplest way to ask this question is with some code:
struct Point
{
int x;
int y;
int z;
int* as_pointer() { return &x; } // works
int (&as_array_ref())[3] { return &x; } // does not work
};
as_pointer
compiles, as_array_ref
does not. A cast seems to be in order but I can't figure out the appropriate syntax. Any ideas?