Summary: Closes #264
Modified by @sgolemon from the original PR to declare MSVC2015-final as the official minimum version, making the defines in the original PR unnecessary.
Reviewed By: @yfeldblum
Differential Revision:
D2284130
Pulled By: @sgolemon
int entryCountThreadCacheSize;
size_t capacity; // if positive, overrides maxLoadFactor
- constexpr Config() : emptyKey((KeyT)-1),
- lockedKey((KeyT)-2),
- erasedKey((KeyT)-3),
+ private:
+ static constexpr KeyT kEmptyKey = (KeyT)-1;
+ static constexpr KeyT kLockedKey = (KeyT)-2;
+ static constexpr KeyT kErasedKey = (KeyT)-3;
+
+ public:
+ constexpr Config() : emptyKey(kEmptyKey),
+ lockedKey(kLockedKey),
+ erasedKey(kErasedKey),
maxLoadFactor(0.8),
growthFactor(-1),
entryCountThreadCacheSize(1000),
* Note: list must be empty on destruction.
*/
~AtomicLinkedList() {
- assert(head_ == nullptr);
+ assert(empty());
}
bool empty() const {