Summary:
Because MSVC's standard library implementation is now checking that this is actually the case:
```
error C2338: set<T, Compare, Allocator> requires that Allocator's value_type match T (See N4659 26.2.1 [container.requirements.general]/16 allocator_type) Either fix the allocator value_type or define _ENFORCE_MATCHING_ALLOCATORS=0 to suppress this diagnostic.
```
I've gone with the "Fix the `value_type`" approach.
Reviewed By: yfeldblum
Differential Revision:
D5441017
fbshipit-source-id:
b30403d2e48f815177cac29c4e6eec4e79583660
-typedef MemoryLeakCheckerAllocator<std::allocator<char>> KeyLeakChecker;
-typedef MemoryLeakCheckerAllocator<
- std::allocator<std::pair<const StringPiece, int>>> ValueLeakChecker;
+using KeyValuePairLeakChecker = MemoryLeakCheckerAllocator<
+ std::allocator<std::pair<const StringPiece, int>>>;
+using ValueLeakChecker =
+ MemoryLeakCheckerAllocator<std::allocator<StringPiece>>;
typedef StringKeyedUnorderedMap<
int,
folly::Hash,
std::equal_to<StringPiece>,
typedef StringKeyedUnorderedMap<
int,
folly::Hash,
std::equal_to<StringPiece>,
+ KeyValuePairLeakChecker>
LeakCheckedUnorderedMap;
typedef StringKeyedSetBase<std::less<StringPiece>, ValueLeakChecker>
LeakCheckedSet;
LeakCheckedUnorderedMap;
typedef StringKeyedSetBase<std::less<StringPiece>, ValueLeakChecker>
LeakCheckedSet;
-typedef StringKeyedMap<int, std::less<StringPiece>, ValueLeakChecker>
+typedef StringKeyedMap<int, std::less<StringPiece>, KeyValuePairLeakChecker>
LeakCheckedMap;
using LeakCheckedUnorderedSet = BasicStringKeyedUnorderedSet<
LeakCheckedMap;
using LeakCheckedUnorderedSet = BasicStringKeyedUnorderedSet<