Add IOBuf::takeOwnership(unique_ptr<T>&&).
authorTudor Bosman <tudorb@fb.com>
Mon, 11 Jun 2012 20:58:15 +0000 (13:58 -0700)
committerTudor Bosman <tudorb@fb.com>
Tue, 12 Jun 2012 23:22:50 +0000 (16:22 -0700)
commitc838e280a34ae3afe616fe5ac1cde2b573e4f160
tree3e4cb0ca28984553a05cfa9f52be687e58327fbd
parent4d3ede0d334834234d588146d78b1609515cd070
Add IOBuf::takeOwnership(unique_ptr<T>&&).

Summary:
Useful for in-place serialization.  Dangerous, obviously, but anything
involving IOBuf usually is.

Test Plan: test added

Reviewed By: brianp@fb.com

FB internal diff: D491663
folly/experimental/io/IOBuf.h
folly/experimental/io/test/IOBufTest.cpp