Jonathan Wakely
|
1319041924
|
Avoid reallocation for basic_string::clear()
PR libstdc++/56166
PR libstdc++/77582
* include/bits/basic_string.h (basic_string::clear()): Drop reference
and use empty rep.
* include/ext/rc_string_base.h (__rc_string_base::_M_clear()):
Likewise.
* testsuite/21_strings/basic_string/56166.cc: New.
* testsuite/ext/vstring/modifiers/clear/56166.cc: New.
From-SVN: r240447
|
2016-09-23 18:25:34 +01:00 |
|