Sorry, I missed the important statement about assuming that the vector contains 50MB of data; that changes a lot.
Template meta programming used to be about the only way to avoid temporaries, but...
Type: Posts; User: iMalc
Sorry, I missed the important statement about assuming that the vector contains 50MB of data; that changes a lot.
Template meta programming used to be about the only way to avoid temporaries, but...
You should also note that statements like a = b * c; do not necessarily result in the overhead of the creation and copying from a temporary. RVO and NRVO are allowed to modify the behaviour of such...