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:
parent
de55c2f869
commit
5abbe8ec9e
@ -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());
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user