3 ms·
> To say that something isn't magic is an empty statement I think this is said to express "simply replacing that function call/method/... without changing your
by Sebb767 6y ago
> To say that something isn't magic is an empty statement
I think this is said to express "simply replacing that function call/method/... without changing your calls/methods/coding style is not going to magically solve your problems". Which is true in the push_back/emplace_back case (you need to adjust your call).
GC, on the other hand, is magic pixie dust, if my definition is correct ;)
- MaxBarraclough 6y ago> I think this is said to express "simply replacing that function call/method/... without changing your calls/methods/coding style is not going to magically solve your problems" I agree, but you're doing all the work in conjuring this interpretation. Saying it's not magic doesn't say anything substantial. If it were possible to mechanically replace all references to push_back by emplace_back for an easy performance boost, then we wouldn't need emplace_back to be its own member function, it would just be a compiler optimisation. You have to make shallow and localised changes to make proper use of emplace_back, but isn't that the best we can hope for? Far easier than parallelism, say, where sweeping architectural changes may be necessary.