C+11 rvalue和移动语义混淆(返回语句)
std::vector<int> return_vector(void){ std::vector<int> tmp {1,2,3,4,5}; return tmp;}std::vector<int> &&rval_ref = return_vector();
std::vector<int>&& return_vector(void){ std::vector<int> tmp {1,2,3,4,5}; return std::move(tmp);}std::vector<int> &&rval_ref = return_vector();
std::vector<int> return_vector(void){ std::vector<int> tmp {1,2,3,4,5}; return std::move(tmp);}std::vector<int> &&rval_ref = return_vector();
繁华开满天机
蝴蝶刀刀
相关分类