]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Implement "Printing blank lines with println" for C++23
authorJonathan Wakely <jwakely@redhat.com>
Thu, 21 Mar 2024 23:09:14 +0000 (23:09 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 17 Apr 2024 16:33:10 +0000 (17:33 +0100)
commit7c2a9dbcc2c1cb1563774068c59d5e09edc59f06
tree94a222b3a64132f9065a47bf50407a4e0c40e0b2
parent57056146f4ffc5ea347c03e37e1e2c7cd99261d0
libstdc++: Implement "Printing blank lines with println" for C++23

This was recently approved for C++26 at the Tokyo meeting. As suggested
by Stephan T. Lavavej, I'm defining it as an extension for C++23 mode
(when std::print and std::prinln were first added) rather than as a new
C++26 feature. Both MSVC and libc++ have agreed to do this too.

libstdc++-v3/ChangeLog:

* include/std/ostream (println(ostream&)): Define new overload.
* include/std/print (println(FILE*), println()): Likewise.
* testsuite/27_io/basic_ostream/print/2.cc: New test.
* testsuite/27_io/print/1.cc: Remove unused header.
* testsuite/27_io/print/3.cc: New test.
libstdc++-v3/include/std/ostream
libstdc++-v3/include/std/print
libstdc++-v3/testsuite/27_io/basic_ostream/print/2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/27_io/print/1.cc
libstdc++-v3/testsuite/27_io/print/3.cc [new file with mode: 0644]