Baton::ready, a const variant of try_wait
[folly.git] / folly / LockTraits.h
index 15ffe1124079c26a16b3f31fd3bc234bad7292a7..a6cf12b596f03896bc8f28716132bb71e2254e45 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 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.
@@ -106,11 +106,11 @@ class LockInterfaceDispatcher {
  public:
   static constexpr bool has_lock_unique = true;
   static constexpr bool has_lock_timed =
-      decltype(timed_lock_test<Mutex>(0))::value;
+      decltype(timed_lock_test<Mutex>(nullptr))::value;
   static constexpr bool has_lock_shared =
-      decltype(lock_shared_test<Mutex>(0))::value;
+      decltype(lock_shared_test<Mutex>(nullptr))::value;
   static constexpr bool has_lock_upgrade =
-      decltype(lock_upgrade_test<Mutex>(0))::value;
+      decltype(lock_upgrade_test<Mutex>(nullptr))::value;
 };
 
 /**
@@ -338,7 +338,7 @@ struct LockTraitsImpl<Mutex, MutexLevel::UPGRADE, true>
   }
 };
 
-} // detail
+} // namespace detail
 
 /**
  * LockTraits describes details about a particular mutex type.
@@ -637,4 +637,4 @@ struct LockPolicyFromExclusiveToShared : public LockPolicyShared {
   }
 };
 
-} // folly
+} // namespace folly