Revert "[ADT] Add std::string_view conversion to SmallString (#83397)"

This reverts commit cff36bb198759c4fe557adc594eabc097cf7d565.

This patch was causing build failures in certain configurations.
This commit is contained in:
Aiden Grossman 2024-02-29 13:13:58 -08:00
parent de55c2f869
commit 5abbe8ec9e
2 changed files with 0 additions and 11 deletions

View File

@ -265,11 +265,6 @@ public:
/// Implicit conversion to StringRef.
operator StringRef() const { return str(); }
/// Implicit conversion to std::string_view.
operator std::string_view() const {
return std::string_view(this->data(), this->size());
}
explicit operator std::string() const {
return std::string(this->data(), this->size());
}

View File

@ -244,10 +244,4 @@ TEST_F(SmallStringTest, GTestPrinter) {
EXPECT_EQ(R"("foo")", ::testing::PrintToString(ErasedSmallString));
}
TEST_F(SmallStringTest, StringView) {
theString = "hello from std::string_view";
EXPECT_EQ("hello from std::string_view",
static_cast<std::string_view>(theString));
}
} // namespace