2013/12/2 Antony Polukhin <antoshkka@gmail.com>
You are absolutely right: ValueType&& any_cast(any&&) was not a good idea and it may break code that accepts result by const reference.
Making it ValueType any_cast(any&&) would be more correct.
I'll fix that as soon as the migration to the GIT will be finished.
Great thanks for finding, investigating and reporting this issue!
Created ticket #9462 : https://svn.boost.org/trac/boost/ticket/9462
That said, what do you gain by doing:const auto& vec = boost::any_cast<std::vector<int>>(makeVec());
instead ofconst auto vec = boost::any_cast<std::vector<int>>(makeVec());
?
Regards,Kris