Constrain launch ~ operator to defined bits.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185452 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/future b/include/future
index 160114e..dae1a4b 100644
--- a/include/future
+++ b/include/future
@@ -443,7 +443,7 @@
 launch
 operator~(launch __x)
 {
-    return static_cast<launch>(~static_cast<__launch_underlying_type>(__x));
+    return static_cast<launch>(~static_cast<__launch_underlying_type>(__x) & 3);
 }
 
 inline _LIBCPP_INLINE_VISIBILITY