logging: reduce the amount of code emitted for log statements
[folly.git] / folly / MoveWrapper.h
index 6fbd710e69ab55b75769c9af418c3a8d4458c3b6..3f8cf0308b377ad97c2944c7b9ab57c26eadebff 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -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;