fix: remove unused tr_strbuf::join() (#8144)

This commit is contained in:
Charles Kerr
2026-01-15 14:37:22 -06:00
committed by GitHub
parent 6ba8ec7e6f
commit a8f531b572
2 changed files with 0 additions and 37 deletions

View File

@@ -251,26 +251,6 @@ public:
/// ///
template<typename... Args>
void join(Char delim, Args const&... args)
{
((append(args), append(delim)), ...);
resize(size() - 1);
}
template<typename ContiguousRange, typename... Args>
void join(ContiguousRange const& delim, Args const&... args)
{
((append(args), append(delim)), ...);
resize(size() - std::size(delim));
}
template<typename... Args>
void join(Char const* sz_delim, Args const&... args)
{
join(std::basic_string_view<Char>{ sz_delim }, args...);
}
// NOLINTNEXTLINE(google-explicit-constructor) // NOLINTNEXTLINE(google-explicit-constructor)
[[nodiscard]] constexpr operator std::basic_string_view<Char>() const noexcept [[nodiscard]] constexpr operator std::basic_string_view<Char>() const noexcept
{ {

View File

@@ -136,23 +136,6 @@ TEST_F(StrbufTest, iterators)
} }
} }
TEST_F(StrbufTest, join)
{
auto buf = tr_pathbuf{};
buf.clear();
buf.join(' ', 'A', "short", "phrase"sv);
EXPECT_EQ("A short phrase"sv, buf.sv());
buf.clear();
buf.join(" ", 'A', "short", "phrase"sv);
EXPECT_EQ("A short phrase"sv, buf.sv());
buf.clear();
buf.join("--"sv, 'A', "short", "phrase"sv);
EXPECT_EQ("A--short--phrase"sv, buf.sv());
}
TEST_F(StrbufTest, move) TEST_F(StrbufTest, move)
{ {
static auto constexpr Value = "/hello/world"sv; static auto constexpr Value = "/hello/world"sv;