Make IOBuf copyable
authorTudor Bosman <tudorb@fb.com>
Thu, 11 Jun 2015 18:18:41 +0000 (11:18 -0700)
committerSara Golemon <sgolemon@fb.com>
Thu, 11 Jun 2015 20:15:13 +0000 (13:15 -0700)
commit60825c9bca47c6919ad192527dacd052b02e13b9
tree17f268a027af668583c9f8fa3920fb6e8c2fbd22
parentbd0cc9814f294fab7c186545988b8d2cf9a236c8
Make IOBuf copyable

Summary: Give IOBuf a copy constructor, which clones the whole chain. (IOBufs have
shared pointer semantics). You could argue for cloning one single IOBuf,
but cloning the whole chain has the nice side effect of making Thrift
structures with IOBufs in them copyable, so there's that.

Reviewed By: @djwatson

Differential Revision: D2127209
folly/io/IOBuf.cpp
folly/io/IOBuf.h
folly/io/test/IOBufTest.cpp