传递 by-rvalue-reference 问答列表

按值传递和 std::move 与转发引用

作者:Alex O 提问时间:10/28/2021

我经常遇到按值传递和移动的习语: struct Test { Test(std::string str_) : str{std::move(str_)} {} std::string str; ...


共1条 当前第1页