On Thursday, 27 February 2025 at 01:22:07 UTC, Hipreme wrote:
And no, it won't create 2 copies. D has a thing called Return Value Optimization. Since that local variable is returned, it has no need to copy it.
That's great to know. Thank you!
Arredondo via Digitalmars-d-learn Wed, 26 Feb 2025 18:17:06 -0800
On Thursday, 27 February 2025 at 01:22:07 UTC, Hipreme wrote:
And no, it won't create 2 copies. D has a thing called Return Value Optimization. Since that local variable is returned, it has no need to copy it.
That's great to know. Thank you!