On Mon, 21 Nov 2022 at 14:17, Yubin Ruan wrote: > It seems that currently the only way to guarantee efficiency is to use move instead. The move will happen automatically. All you need to do is have an efficient move constructor, the compiler does the rest. You do not need to say 'return std::move(local1);' because that happens automatically.