On Wednesday, 7 April 2021 at 12:28:25 UTC, tcak wrote:
@property auto b(){ return a.ptr; } // this is a possibility, but results with overhead of calling. Also, b is not an array anymore, just int*.

Why are you returning a.ptr instead of just a?

If you return just a, it works fine for what you want.


You can virtually guarantee no calling overhead by simply making that `final`; then it is easy for the compiler to inline in all cases.

Reply via email to