cpp_weekly
cpp_weekly copied to clipboard
How small object optimizations work
trafficstars
std::any, std::function and std::string each have optimizations that avoid heap allocations for the case of "small" objects. How do these optimizations work?