Why are by-value parameters excluded from NRVO?
Here’s why copy elision doesn’t make sense for parameters. It’s really about the implementation of the concept at the compiler level. Copy elision works by essentially constructing the return value in-place. The value isn’t copied out; it’s created directly in its intended destination. It’s the caller who provides the space for the intended output, and … Read more