Commit a64e4f2d authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by facebook-github-bot-9

Avoid incorrect constexpr in folly/AtomicHashArray.h.

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
parent e7e569e9
...@@ -134,13 +134,13 @@ class AtomicHashArray : boost::noncopyable { ...@@ -134,13 +134,13 @@ class AtomicHashArray : boost::noncopyable {
static const KeyT kErasedKey; static const KeyT kErasedKey;
public: public:
constexpr Config() : emptyKey(kEmptyKey), Config() : emptyKey(kEmptyKey),
lockedKey(kLockedKey), lockedKey(kLockedKey),
erasedKey(kErasedKey), erasedKey(kErasedKey),
maxLoadFactor(0.8), maxLoadFactor(0.8),
growthFactor(-1), growthFactor(-1),
entryCountThreadCacheSize(1000), entryCountThreadCacheSize(1000),
capacity(0) {} capacity(0) {}
}; };
static const Config defaultConfig; static const Config defaultConfig;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment