diff --git a/infer/tests/codetoanalyze/cpp/pulse/reference_stability.cpp b/infer/tests/codetoanalyze/cpp/pulse/reference_stability.cpp index b6417a50f0f..e909ae84dcf 100644 --- a/infer/tests/codetoanalyze/cpp/pulse/reference_stability.cpp +++ b/infer/tests/codetoanalyze/cpp/pulse/reference_stability.cpp @@ -8,11 +8,13 @@ #include #include #include +#include // Keep a simplified skeleton of F14 maps for testing. namespace folly { struct F14HashToken; +namespace f14::detail { template struct F14BasicMap { using key_type = Key; @@ -164,12 +166,33 @@ struct F14BasicMap { void reserve(std::size_t capacity); }; -template -using F14ValueMap = F14BasicMap; -template -using F14VectorMap = F14BasicMap; -template -using F14FastMap = F14BasicMap; +template +class F14VectorMapImpl : public F14BasicMap { + using F14BasicMap::F14BasicMap; +}; +} // namespace f14::detail + +template +class F14ValueMap : public f14::detail::F14BasicMap { + using f14::detail::F14BasicMap::F14BasicMap; +}; + +template +class F14VectorMap : public f14::detail::F14VectorMapImpl { + using f14::detail::F14VectorMapImpl::F14VectorMapImpl; +}; + +template +class F14FastMap : public std::conditional< + sizeof(std::pair) < 24, + F14ValueMap, + f14::detail::F14VectorMapImpl>::type { + using Super = + std::conditional) < 24, + F14ValueMap, + f14::detail::F14VectorMapImpl>::type; + using Super::Super; +}; } // namespace folly void unordered_map_ok() {