diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2022-06-14 14:54:27 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2022-06-14 21:07:47 +0100 |
commit | 1b65779f46f16b4fffd0591f5e58722c1e7cde8d (patch) | |
tree | c366f92a62fb159b814f0c254df0f0f8a1ad0847 /libgo | |
parent | 29da01709facbcc7efef4fd6767660d417f44531 (diff) | |
download | gcc-1b65779f46f16b4fffd0591f5e58722c1e7cde8d.zip gcc-1b65779f46f16b4fffd0591f5e58722c1e7cde8d.tar.gz gcc-1b65779f46f16b4fffd0591f5e58722c1e7cde8d.tar.bz2 |
libstdc++: Inline all basic_string::compare overloads [PR59048]
Defining the compare member functions inline allows calls to
traits_type::length and std::min to be inlined, taking advantage of
constant expression arguments. When not inline, the compiler prefers to
use the explicit instantiation definitions in libstdc++.so and can't
take advantage of constant arguments.
libstdc++-v3/ChangeLog:
PR libstdc++/59048
* include/bits/basic_string.h (compare): Define inline.
* include/bits/basic_string.tcc (compare): Remove out-of-line
definitions.
* include/bits/cow_string.h (compare): Define inline.
* testsuite/21_strings/basic_string/operations/compare/char/3.cc:
New test.
Diffstat (limited to 'libgo')
0 files changed, 0 insertions, 0 deletions