PR libstdc++/86169 unshare COW string when non-const data() called
authorJonathan Wakely <jwakely@redhat.com>
Fri, 15 Jun 2018 18:47:29 +0000 (19:47 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 15 Jun 2018 18:47:29 +0000 (19:47 +0100)
commit525d67d42f0ad365a666c7908e9df7da55aa2f1e
tree3d1393199b035524e84a331e1eb4a4ca45a572ce
parent36eec25a6fa7c32e36d7f77f85c8acb7ff38a66b
PR libstdc++/86169 unshare COW string when non-const data() called

PR libstdc++/86169
* include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
(basic_string::data()): Unshare string.
* testsuite/21_strings/basic_string/operations/data/char/86169.cc:
New.

From-SVN: r261642
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/basic_string.h
libstdc++-v3/testsuite/21_strings/basic_string/operations/data/char/86169.cc [new file with mode: 0644]