libstdc++: Implement C++20 features for <sstream>
authorThomas Rodgers <trodgers@redhat.com>
Wed, 28 Oct 2020 18:52:17 +0000 (11:52 -0700)
committerThomas Rodgers <trodgers@redhat.com>
Wed, 28 Oct 2020 18:56:06 +0000 (11:56 -0700)
commita0e4d7b44c544c84cffc7ff9c64b6f1af14fb08d
tree5436f8e6b2790a3d2c3c1c9a2ba7f50fe20c98d5
parent4289e488dddc1f07a04feca6568b329f65b8fa10
libstdc++: Implement C++20 features for <sstream>

New ctors and ::view() accessor for -
  * basic_stingbuf
  * basic_istringstream
  * basic_ostringstream
  * basic_stringstreamm

New ::get_allocator() accessor for basic_stringbuf.

libstdc++-v3/ChangeLog:
* acinclude.m4 (glibcxx_SUBDIRS): Add src/c++20.
* config/abi/pre/gnu.ver (GLIBCXX_3.4.29): New symbols.
* configure: Regenerate.
* include/std/sstream:
(basic_stringbuf::basic_stringbuf(allocator const&)): New constructor.
(basic_stringbuf::basic_stringbuf(openmode, allocator const&)): Likewise.
(basic_stringbuf::basic_stringbuf(basic_string&&, openmode)): Likewise.
(basic_stringbuf::basic_stringbuf(basic_stringbuf&&, allocator const&)):
Likewise.
(basic_stringbuf::get_allocator()): New method.
(basic_stringbuf::view()): Likewise.
(basic_istringstream::basic_istringstream(basic_string&&, openmode)):
New constructor.
(basic_istringstream::basic_istringstream(openmode, allocator const&)):
Likewise
(basic_istringstream::view()): New method.
(basic_ostringstream::basic_ostringstream(basic_string&&, openmode)):
New constructor.
(basic_ostringstream::basic_ostringstream(openmode, allocator const&)):
Likewise
(basic_ostringstream::view()): New method.
(basic_stringstream::basic_stringstream(basic_string&&, openmode)):
New constructor.
(basic_stringstream::basic_stringstream(openmode, allocator const&)):
Likewise
(basic_stringstream::view()): New method.
* src/Makefile.in: Add c++20 directory.
* src/Makefile.am: Regenerate.
* src/c++20/Makefile.am: Add makefile for new sub-directory.
* src/c++20/Makefile.in: Generate.
* src/c++20/sstream-inst.cc: New file defining explicit
instantiations for basic_stringbuf, basic_istringstream,
basic_ostringstream, and basic_stringstream member functions
added in C++20.
* testsuite/27_io/basic_stringbuf/cons/char/2.cc: New test.
* testsuite/27_io/basic_stringbuf/cons/wchar_t/2.cc: Likewise.
* testsuite/27_io/basic_stringbuf/view/char/1.cc: Likewise.
* testsuite/27_io/basic_stringbuf/view/wchar_t/1.cc: Likewise.
* testsuite/27_io/basic_istringstream/cons/char/1.cc: Likewise.
* testsuite/27_io/basic_istringstream/cons/wchar_t/1.cc: Likewise.
* testsuite/27_io/basic_istringstream/view/char/1.cc: Likewise.
* testsuite/27_io/basic_istringstream/view/wchar_t/1.cc: Likewise.
* testsuite/27_io/basic_ostringstream/cons/char/1.cc: Likewise.
* testsuite/27_io/basic_ostringstream/cons/wchar_t/1.cc: Likewise.
* testsuite/27_io/basic_ostringstream/view/char/1.cc: Likewise.
* testsuite/27_io/basic_ostringstream/view/wchar_t/1.cc: Likewise.
* testsuite/27_io/basic_stringstream/cons/char/1.cc: Likewise.
* testsuite/27_io/basic_stringstream/cons/wchar_t/1.cc: Likewise.
* testsuite/27_io/basic_stringstream/view/char/1.cc: Likewise.
* testsuite/27_io/basic_stringstream/view/wchar_t/1.cc: Likewise.
25 files changed:
libstdc++-v3/acinclude.m4
libstdc++-v3/config/abi/pre/gnu.ver
libstdc++-v3/configure
libstdc++-v3/include/std/sstream
libstdc++-v3/src/Makefile.am
libstdc++-v3/src/Makefile.in
libstdc++-v3/src/c++20/Makefile.am [new file with mode: 0644]
libstdc++-v3/src/c++20/Makefile.in [new file with mode: 0644]
libstdc++-v3/src/c++20/sstream-inst.cc [new file with mode: 0644]
libstdc++-v3/testsuite/27_io/basic_istringstream/cons/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/27_io/basic_istringstream/cons/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/27_io/basic_istringstream/view/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/27_io/basic_istringstream/view/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/27_io/basic_ostringstream/cons/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/27_io/basic_ostringstream/cons/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/27_io/basic_ostringstream/view/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/27_io/basic_ostringstream/view/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/27_io/basic_stringbuf/cons/char/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/27_io/basic_stringbuf/cons/wchar_t/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/27_io/basic_stringbuf/view/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/27_io/basic_stringbuf/view/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/27_io/basic_stringstream/cons/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/27_io/basic_stringstream/cons/wchar_t/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/27_io/basic_stringstream/view/char/1.cc [new file with mode: 0644]
libstdc++-v3/testsuite/27_io/basic_stringstream/view/wchar_t/1.cc [new file with mode: 0644]