diff options
author | Nathan Myers <ncm@cantrip.org> | 2025-06-04 14:52:29 -0400 |
---|---|---|
committer | Nathan Myers <ncm@cantrip.org> | 2025-06-04 15:07:10 -0400 |
commit | 8537e4851072ea1f1982c4c6ab0d24c9383e9edd (patch) | |
tree | 5c8c1ee2f00e811be82e8b5a5a4de1cf65ddddd5 /libstdc++-v3/testsuite/std | |
parent | e73a6d982789746d4bce9d0e595203f2a8dbbaa7 (diff) | |
download | gcc-8537e4851072ea1f1982c4c6ab0d24c9383e9edd.zip gcc-8537e4851072ea1f1982c4c6ab0d24c9383e9edd.tar.gz gcc-8537e4851072ea1f1982c4c6ab0d24c9383e9edd.tar.bz2 |
libstdc++: sstream from string_view (P2495R3) [PR119741]
Add constructors to stringbuf, stringstream, istringstream, and ostringstream,
and a matching overload of str(sv) in each, that take anything convertible to
a string_view in places where the existing ctors and function take a string.
Note this change omits the constraint applied to the istringstream constructor
from string cited as a "drive-by" in P2495R3, as we have determined it is
redundant.
libstdc++-v3/ChangeLog:
PR libstdc++/119741
* include/std/sstream: full implementation, really just
decls, requires clause and plumbing.
* include/bits/version.def, include/bits/version.h:
new preprocessor symbol
__cpp_lib_sstream_from_string_view.
* testsuite/27_io/basic_stringbuf/cons/char/string_view.cc:
New tests.
* testsuite/27_io/basic_istringstream/cons/char/string_view.cc:
New tests.
* testsuite/27_io/basic_ostringstream/cons/char/string_view.cc:
New tests.
* testsuite/27_io/basic_stringstream/cons/char/string_view.cc:
New tests.
* testsuite/27_io/basic_stringbuf/cons/wchar_t/string_view.cc:
New tests.
* testsuite/27_io/basic_istringstream/cons/wchar_t/string_view.cc:
New tests.
* testsuite/27_io/basic_ostringstream/cons/wchar_t/string_view.cc:
New tests.
* testsuite/27_io/basic_stringstream/cons/wchar_t/string_view.cc:
New tests.
Diffstat (limited to 'libstdc++-v3/testsuite/std')
0 files changed, 0 insertions, 0 deletions