Skip to content

Commit b5d306f

Browse files
committed
[Basic] Removed spurious req from FrozenMultiMap.
Its storage vector is intended to be of some type like `std::vector<std::pair<Key, Optional<Value>>>`, i.e., some collection of pairs whose `second` is an `Optional<Value>`. So when constructing a default instance of that pair, just construct an Optional in the None case.
1 parent d71121b commit b5d306f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/swift/Basic/FrozenMultiMap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class FrozenMultiMap {
7171
// Since our array is sorted, we need to first find the first pair with our
7272
// inst as the first element.
7373
auto start = std::lower_bound(
74-
storage.begin(), storage.end(), std::make_pair(key, Value()),
74+
storage.begin(), storage.end(), std::make_pair(key, llvm::None),
7575
[&](const std::pair<Key, Optional<Value>> &p1,
7676
const std::pair<Key, Optional<Value>> &p2) {
7777
return p1.first < p2.first;

0 commit comments

Comments
 (0)