Commit d08270e6 authored by Hans Fugal's avatar Hans Fugal Committed by Sara Golemon

MoveWrapper::move()

Summary: sugar providing `foo.move()` instead of `std::move(*foo)`.

Test Plan: Inspection. Using it in another diff.

Reviewed By: yfeldblum@fb.com, hannesr@fb.com

Subscribers: trunkagent, exa, folly-diffs@, yfeldblum

FB internal diff: D1882208

Signature: t1:1882208:1425331389:a9c09ad2739838c829e2afdad64e985810154226
parent 75278c63
......@@ -54,6 +54,9 @@ class MoveWrapper {
const T* operator->() const { return &value; }
T* operator->() { return &value; }
/// move the value out (sugar for std::move(*moveWrapper))
T&& move() { return std::move(value); }
// If you want these you're probably doing it wrong, though they'd be
// easy enough to implement
MoveWrapper& operator=(MoveWrapper const&) = delete;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment