compiler : visual c++ 2010
os : win7 64bits
std::string temp = "temp";
boost::tuple<std::string> A( std::move(temp) ); //this is copy
std::tuple<std::string> A( std::move(temp) ); //better, woundn't compile
this is inconvenient when I want to do something like this
std::tuple<std::string> kkk()
{
std::string temp = "temp";
return std::make_tuple( std::move(temp) );
}
This can't work either(as expected)
std::unique_ptr<std::string> strMove(new std::string("jjjjj"));
boost::tuple< std::unique_ptr<std::string> > move_tuple( std::move(strMove) );
This one is okay
std::shared_ptr<std::string> strShared(new std::string("wawawa"));
boost::tuple< std::shared_ptr<std::string> > move_tuple( strShared );
Do C++11 make tuple assist rvalue reference?
Thanks