Avoid incorrect constexpr in folly/AtomicHashArray.h.
authorYedidya Feldblum <yfeldblum@fb.com>
Fri, 7 Aug 2015 19:34:34 +0000 (12:34 -0700)
committerfacebook-github-bot-9 <folly-bot@fb.com>
Fri, 7 Aug 2015 21:23:02 +0000 (14:23 -0700)
Summary: [Folly] Avoid incorrect constexpr in folly/AtomicHashArray.h.

It's actually not transitively constexpr, because it uses const values that are not themselves constexpr. Depending on the compiler, it could theoretically fail to build.

Reviewed By: @Gownta

Differential Revision: D2322143

folly/AtomicHashArray.h

index 1142eda95566da353218916362e0e5aacbadaecd..3479572dc53488a1b8c0e1bfee105b18029eef23 100644 (file)
@@ -134,13 +134,13 @@ class AtomicHashArray : boost::noncopyable {
     static const KeyT kErasedKey;
 
   public:
-    constexpr Config() : emptyKey(kEmptyKey),
-                         lockedKey(kLockedKey),
-                         erasedKey(kErasedKey),
-                         maxLoadFactor(0.8),
-                         growthFactor(-1),
-                         entryCountThreadCacheSize(1000),
-                         capacity(0) {}
+    Config() : emptyKey(kEmptyKey),
+               lockedKey(kLockedKey),
+               erasedKey(kErasedKey),
+               maxLoadFactor(0.8),
+               growthFactor(-1),
+               entryCountThreadCacheSize(1000),
+               capacity(0) {}
   };
 
   static const Config defaultConfig;