3 ms·
> Most optimizations you can do by reusing a moved value could be done automatically by the compiler Not if constructing the object is costly. It is very well
by arunmu 10y ago
> Most optimizations you can do by reusing a moved value could be done automatically by the compiler
Not if constructing the object is costly. It is very well possible for an object not to have a default constructor.
- Manishearth 10y agoLike I said, most optimizations. Such datatypes are rare and this is eclipsed by the cost of reallocing common types like vectors.