]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Support constexpr global std::string for size < 15 [PR105995]
authorJonathan Wakely <jwakely@redhat.com>
Thu, 16 Jun 2022 13:57:32 +0000 (14:57 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 16 Jun 2022 19:20:40 +0000 (20:20 +0100)
commit98a0d72a610a87e8e383d366e50253ddcc9a51dd
treece3442008ef417de9e0dd5133dc2ea77f8dd7171
parent51309d1158b85560a975819260776c0ca68fd142
libstdc++: Support constexpr global std::string for size < 15 [PR105995]

I don't think this is required by the standard, but it's easy to
support.

libstdc++-v3/ChangeLog:

PR libstdc++/105995
* include/bits/basic_string.h (_M_use_local_data): Initialize
the entire SSO buffer.
* testsuite/21_strings/basic_string/cons/char/105995.cc: New test.
libstdc++-v3/include/bits/basic_string.h
libstdc++-v3/testsuite/21_strings/basic_string/cons/char/105995.cc [new file with mode: 0644]