aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorubyte <swarmer@yandex-team.com>2025-03-24 14:31:02 +0300
committerGitHub <noreply@github.com>2025-03-24 14:31:02 +0300
commit5fac434c3ba3a738daaa150d0bf84cd74a4967f8 (patch)
treebb9d780e70f3b4936282826b9b0ba225cc3e1633
parentce1388f1b15519b96aff2ef71a984867f0393687 (diff)
downloadydb-5fac434c3ba3a738daaa150d0bf84cd74a4967f8.tar.gz
IGNIETFERRO-1955: do not rely on implementation-dependent allocator friendship behaviour (#16090)
-rw-r--r--ydb/public/lib/ydb_cli/common/pretty_table.cpp2
-rw-r--r--ydb/public/lib/ydb_cli/common/pretty_table.h3
2 files changed, 2 insertions, 3 deletions
diff --git a/ydb/public/lib/ydb_cli/common/pretty_table.cpp b/ydb/public/lib/ydb_cli/common/pretty_table.cpp
index 428b3563351..b2d9f9dc66d 100644
--- a/ydb/public/lib/ydb_cli/common/pretty_table.cpp
+++ b/ydb/public/lib/ydb_cli/common/pretty_table.cpp
@@ -173,7 +173,7 @@ void TPrettyTable::TRow::PrintFreeText(IOutputStream& o, size_t width) const {
}
TPrettyTable::TRow& TPrettyTable::AddRow() {
- return Rows.emplace_back(Columns);
+ return Rows.emplace_back(TRow{Columns});
}
static void PrintDelim(IOutputStream& o, const TVector<size_t>& widths,
diff --git a/ydb/public/lib/ydb_cli/common/pretty_table.h b/ydb/public/lib/ydb_cli/common/pretty_table.h
index 071bb40d212..edd20d03961 100644
--- a/ydb/public/lib/ydb_cli/common/pretty_table.h
+++ b/ydb/public/lib/ydb_cli/common/pretty_table.h
@@ -32,7 +32,6 @@ class TPrettyTable {
public:
class TRow {
friend class TPrettyTable;
- friend class std::allocator<TRow>; // for emplace_back()
// header row ctor
explicit TRow(const TVector<TString>& columnNames) {
@@ -91,7 +90,7 @@ public:
, Config(config)
{
if (Config.Header) {
- Rows.emplace_back(columnNames);
+ Rows.emplace_back(TRow{columnNames});
}
}