7 ms·
Because otherwise the struct will be copied when the function is called. Though your question is kind of getting at r-values and move semantics, which is a sol
by codesushi42 7y ago
Because otherwise the struct will be copied when the function is called.
Though your question is kind of getting at r-values and move semantics, which is a solution to prevent copying the temp value both when calling the function and in its execution. You can read about it because it will take too long to explain it here.
- voldacar 7y agoThanks, I'll read about that