Add cloning constructor to folly::IOBuf
authorTudor Bosman <tudorb@fb.com>
Thu, 4 Jun 2015 00:20:40 +0000 (17:20 -0700)
committerNoam Lerner <noamler@fb.com>
Fri, 5 Jun 2015 02:31:22 +0000 (19:31 -0700)
commita3537a0f553e89ca911745fa2e58db454044fb6b
tree6da399320930b4e17b78a0079d56da35312ab5ce
parent26395e9b0dc250bf40f36334b32c8f4599f80a1b
Add cloning constructor to folly::IOBuf

Summary:
``` lang=cpp
folly::IOBuf buf(folly::IOBuf::CLONE, other);
```

is more convenient (and expression-friendly) than

``` lang=cpp
folly::IOBuf buf;
other.cloneInto(buf);
```

Test Plan: used it

Reviewed By: davejwatson@fb.com

Subscribers: net-systems@, folly-diffs@, yfeldblum, chalfant

FB internal diff: D2124605

Signature: t1:2124605:1433372767:c167a36ffdc6d20c740aa57895532e9445766fce
folly/io/IOBuf.h