The motivation is to stop prohibiting callers from
directly passing temporaries. It was not infrequent
to see constructs like:
```cpp
{
// ...
auto tmp = produce_bl();
other_bl.claim_append(tmp);
}
```
They were necessary because `claim_append(bufferlist&)`
requires lvalue reference to which an rvalue can't bind.
This patch fixes the problem by introducing `&&`-taking
variant of `claim_append()`. In the future it could
actually supersede the original one.
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
void claim(list& bl);
void claim_append(list& bl);
+ void claim_append(list&& bl) {
+ claim_append(bl);
+ }
// only for bl is bufferlist::page_aligned_appender
void claim_append_piecewise(list& bl);