mirror of
https://github.com/abseil/abseil-cpp.git
synced 2026-06-04 20:14:23 +08:00
std::multimap::find() is not guaranteed to return the first entry with the
requested key. Any may be returned if many exist. A newer libc++ optimizes the multimap::find() and the first entry is no longer returned. PiperOrigin-RevId: 799621859 Change-Id: Ia17f0ff90f720791be563ffb32dc852fe74cdcf1
This commit is contained in:
committed by
Copybara-Service
parent
e12f5e9bb4
commit
87ac7db2f2
@@ -216,7 +216,7 @@ TEST(Split, APIExamples) {
|
||||
std::multimap<std::string, std::string> m =
|
||||
absl::StrSplit("a,1,b,2,a,3", ',');
|
||||
EXPECT_EQ(3, m.size());
|
||||
auto it = m.find("a");
|
||||
auto it = m.lower_bound("a");
|
||||
EXPECT_EQ("1", it->second);
|
||||
++it;
|
||||
EXPECT_EQ("3", it->second);
|
||||
|
||||
Reference in New Issue
Block a user