I came across an unfamiliar move assignment operator signature in Pytorch' tensor backend (ATen, source).
Just out of curiosity, what does the &&
operator do at the end of
Tensor & Tensor::operator=(Tensor && rhs) &&
While I'm familiar with move semantics and the usual copy/move constructor and assignment operator signatures, I could not find any documentation online about the syntax above.
I would be grateful if someone could explain what this operator does, how it differs from the usual move assignment operation, and when it should be used.