From 785d2b5ad1769e76c9ee85760db922904045c5b2 Mon Sep 17 00:00:00 2001 From: Shai Szulanski Date: Tue, 6 Oct 2026 16:28:47 -0700 Subject: [PATCH] Name SmallListI64's container through a local alias template Differential Revision: D123748307 --- .../src/workloads/ranking/if/ranking.thrift | 4 ++-- .../src/workloads/ranking/if/ranking_containers.h | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 packages/feedsim/third_party/src/workloads/ranking/if/ranking_containers.h diff --git a/packages/feedsim/third_party/src/workloads/ranking/if/ranking.thrift b/packages/feedsim/third_party/src/workloads/ranking/if/ranking.thrift index 8d3252e14..7670ee371 100644 --- a/packages/feedsim/third_party/src/workloads/ranking/if/ranking.thrift +++ b/packages/feedsim/third_party/src/workloads/ranking/if/ranking.thrift @@ -6,7 +6,7 @@ include "thrift/annotation/thrift.thrift" @thrift.AllowLegacyMissingUris package; -cpp_include "folly/small_vector.h" +cpp_include "ranking/if/ranking_containers.h" cpp_include "folly/container/F14Map.h" struct Payload { @@ -78,7 +78,7 @@ struct Action { 4: i64 actorID; } -@cpp.Type{name = "folly::small_vector"} +@cpp.Type{template = "::ranking::SmallVector8"} typedef list SmallListI64 @cpp.Type{template = "folly::F14FastMap"} typedef map RankingPayloadIntMap diff --git a/packages/feedsim/third_party/src/workloads/ranking/if/ranking_containers.h b/packages/feedsim/third_party/src/workloads/ranking/if/ranking_containers.h new file mode 100644 index 000000000..312884f58 --- /dev/null +++ b/packages/feedsim/third_party/src/workloads/ranking/if/ranking_containers.h @@ -0,0 +1,15 @@ +// Copyright (c) Meta Platforms, Inc. and affiliates. +// +// This source code is licensed under the MIT license found in the +// LICENSE file in the root directory of this source tree. + +#pragma once + +#include + +namespace ranking { + +template +using SmallVector8 = folly::small_vector; + +} // namespace ranking