3 ms·
In a lot of cases won't the C++ compiler just inline methods and remove the copies anyway...?
by winrid 3y ago
In a lot of cases won't the C++ compiler just inline methods and remove the copies anyway...?
- fractalb 3y agoInlining functions and copy elision are two different things. If you inline a function without copying it's args, then it'll change the value of the original argument: Copy semantics lost!
- winrid 3y agoRight. I wonder if copy elision can be ignored if functionality is verified to be the same? I'm just a hobbiest c++ dev so sorry for ignorance :)