We should (as a general rule) restrict the use of auto variables to primitive types. Apparently, the type inference to const& for complex objects is not used as expected in several places in the code, thus generating a huge overhead due to unecessary temporary object creation.
We should (as a general rule) restrict the use of auto variables to primitive types. Apparently, the type inference to const& for complex objects is not used as expected in several places in the code, thus generating a huge overhead due to unecessary temporary object creation.