Currently, `capacity()` includes the null terminator of the backing buffer, which does not align with C++20's `std::string`. That is, `s.reserve(s.capacity())` should be a no-op. While there's no requirement these be in-sync, it is less surprising to align its behavior. Also, this fixes the case where `reserve()` is called on an empty string, where previously the null terminator was not set. |
||
|---|---|---|
| .. | ||
| include | ||
| integration | ||
| IntegrationTest | ||
| shared | ||
| src | ||
| UnitTest | ||
| utils | ||
| CMakeLists.txt | ||
| lit.cfg.py | ||
| lit.site.cfg.py.in | ||