folly/futures: replace MoveWrappers with generalised lambda capture
[folly.git] / folly / futures / Unit.h
index 8a8b932c6906e19bf756f171f69ae31cbd972766..0335b8df8f793e7dacc436e2037f8e2d79bfb964 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015 Facebook, Inc.
+ * Copyright 2016 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -30,8 +30,8 @@ struct Unit {
   template <class T> struct Drop : public std::false_type {
     using type = T;
   };
-  bool operator==(const Unit& other) const { return true; }
-  bool operator!=(const Unit& other) const { return false; }
+  bool operator==(const Unit& /*other*/) const { return true; }
+  bool operator!=(const Unit& /*other*/) const { return false; }
 };
 
 // Lift void into Unit.
@@ -62,4 +62,6 @@ template <class T>
 struct is_void_or_unit : public Unit::Lift<T>
 {};
 
+constexpr Unit unit {};
+
 }