mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-08 00:51:20 +08:00
- Add a missing 'explicit' to a basic_stringbuf constructor. - Set up the get/put area pointers in the constructor from strings using different allocator types. - Remove public basic_stringbuf::__sv_type alias. - Do not construct temporary basic_string objects with a default-constructed allocator. Also, change which basic_string constructor is used, as a minor compile-time optimization. Constructing from a basic_string_view requires more work from the compiler, so just use a pointer and length. libstdc++-v3/ChangeLog: * include/std/sstream (basic_stringbuf(const allocator_type&): Add explicit. (basic_stringbuf(const basic_string<C,T,SA>&, openmode, const A&)): Call _M_stringbuf_init. Construct _M_string from pointer and length to avoid constraint checks for string view. (basic_stringbuf::view()): Make __sv_type alias local to the function. (basic_istringstream(const basic_string<C,T,SA>&, openmode, const A&)): Pass string to _M_streambuf instead of constructing a temporary with the wrong allocator. (basic_ostringstream(const basic_string<C,T,SA>&, openmode, const A&)): Likewise. (basic_stringstream(const basic_string<C,T,SA>&, openmode, const A&)): Likewise. * src/c++20/sstream-inst.cc: Use string_view and wstring_view typedefs in explicit instantiations. * testsuite/27_io/basic_istringstream/cons/char/1.cc: Add more tests for constructors. * testsuite/27_io/basic_ostringstream/cons/char/1.cc: Likewise. * testsuite/27_io/basic_stringbuf/cons/char/1.cc: Likewise. * testsuite/27_io/basic_stringbuf/cons/char/2.cc: Likewise. * testsuite/27_io/basic_stringbuf/cons/wchar_t/1.cc: Likewise. * testsuite/27_io/basic_stringbuf/cons/wchar_t/2.cc: Likewise. * testsuite/27_io/basic_stringstream/cons/char/1.cc: Likewise.
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.
Description
Languages
C++
31.9%
C
31.3%
Ada
12%
D
6.5%
Go
6.4%
Other
11.5%