Skip to content

Commit 5fac434

Browse files
authored
IGNIETFERRO-1955: do not rely on implementation-dependent allocator friendship behaviour (#16090)
1 parent ce1388f commit 5fac434

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

ydb/public/lib/ydb_cli/common/pretty_table.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ void TPrettyTable::TRow::PrintFreeText(IOutputStream& o, size_t width) const {
173173
}
174174

175175
TPrettyTable::TRow& TPrettyTable::AddRow() {
176-
return Rows.emplace_back(Columns);
176+
return Rows.emplace_back(TRow{Columns});
177177
}
178178

179179
static void PrintDelim(IOutputStream& o, const TVector<size_t>& widths,

ydb/public/lib/ydb_cli/common/pretty_table.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ class TPrettyTable {
3232
public:
3333
class TRow {
3434
friend class TPrettyTable;
35-
friend class std::allocator<TRow>; // for emplace_back()
3635

3736
// header row ctor
3837
explicit TRow(const TVector<TString>& columnNames) {
@@ -91,7 +90,7 @@ class TPrettyTable {
9190
, Config(config)
9291
{
9392
if (Config.Header) {
94-
Rows.emplace_back(columnNames);
93+
Rows.emplace_back(TRow{columnNames});
9594
}
9695
}
9796

0 commit comments

Comments
 (0)