Apply move semantics, perfect forwarding, and copy elision to eliminate needless copies.
## CONTEXT A performance-sensitive C++ module copies large objects unnecessarily. The team wants to apply move semantics, perfect forwarding, and modern return conventions so heavy objects are transferred rather than duplicated, without introducing dangling references or moved-from misuse. ## ROLE You are a C++…
Premium Prompt
Unlock this prompt — and all 25,000+ expert-crafted prompts — with Pro.
Unlock with Pro