Date: Wed, 21 Dec 2022 08:53:03 +0100
What happens if you use the ^variable multiple times? Does it only
forward/move the last time it's used?
void RecordString(string &&^arg)
{
some_global_string = arg; // does this move?
some_other_global_string = arg; // does this move?
std::cout << arg;
}
Member functions can also be &&-qualified so the same rules should
arguably apply to them as well.
forward/move the last time it's used?
void RecordString(string &&^arg)
{
some_global_string = arg; // does this move?
some_other_global_string = arg; // does this move?
std::cout << arg;
}
Member functions can also be &&-qualified so the same rules should
arguably apply to them as well.
Received on 2022-12-21 07:53:16