On 03.12.2013 00:01, Krzysztof Czainski wrote:[...] what do you gain by doing:In C++11 with a moveable type, probably not much. I don't quite remember why I wrote the code like this - it could have been out of habit since in C++98 using a reference may save a copy, though I guess an optimizing compiler had already been allowed to elide it.const auto& vec = boost::any_cast<std::vector<int>>(makeVec());
instead ofconst auto vec = boost::any_cast<std::vector<int>>(makeVec());
?
Regards,Kris