hjk41的日志

Avatar

More Effecitve C++ 19: Understand origin of temporary objects

Temporary objects are generated when:
1. implicit type conversions are applied to make function calls succeed
2. functions return objects

The construction and destruction of temporary objects are expensive, so we should eliminate them whenever we can.

评论已关闭