template <typename T>
struct Lift : std::conditional<std::is_same<T, void>::value, Unit, T> {};
template <typename T>
+ using LiftT = typename Lift<T>::type;
+ template <typename T>
struct Drop : std::conditional<std::is_same<T, Unit>::value, void, T> {};
-
- bool operator==(const Unit& /*other*/) const { return true; }
- bool operator!=(const Unit& /*other*/) const { return false; }
+ template <typename T>
+ using DropT = typename Drop<T>::type;
+
+ constexpr bool operator==(const Unit& /*other*/) const {
+ return true;
+ }
+ constexpr bool operator!=(const Unit& /*other*/) const {
+ return false;
+ }
};
constexpr Unit unit {};
-}
+} // namespace folly