Commit d39060b
authored
Add missing
Other `IString::startsWith` methods all have it but this doesn't, making
this code not able to compile,
```cpp
Name n;
const Name& n2 = n;
if (n2.startsWith("abc"))
...
```
because `n` here is a const reference. This situation can be easily
created when using containers:
```cpp
std::set<Name> names;
for (auto &n : names)
if (n.startswith("abc"))
...
```
Because `set`'s iterator gives a constant reference, this does not
compile currently.const in one of IString::startsWith methods (#7891)1 parent 882eafe commit d39060b
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
0 commit comments