|
|
|
|
|
by arximboldi
3145 days ago
|
|
Actually performance problems are way more probable when not using auto. Example: std::function<void()> = [] { ... };
Vs: auto = [] { ... }
In the first case you are doing type erasure, which adds quite few penalties. Even in other cases, the type you typed might be convertible from the actual thing that is returned, causing extra conversions. If you always use "auto" the chances you use the right type and do less conversions is way higher. |
|
[1] https://github.com/mhogomchungu/tasks
[2] https://github.com/mhogomchungu/tasks/blob/a1512a1b5e0392a06...