https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99995
--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:462a7f45caf78466ee6d9a1256a1e2848e4ec49c commit r15-6952-g462a7f45caf78466ee6d9a1256a1e2848e4ec49c Author: Jonathan Wakely <jwak...@redhat.com> Date: Wed Dec 11 17:32:39 2024 +0000 libstdc++: Move std::basic_ostream to new internal header [PR99995] This adds <bits/ostream.h> so that other headers don't need to include all of <ostream>, which pulls in all of <format> since C++23 (for the std::print and std::println overloads in <ostream>). This new header allows the constrained operator<< in <bits/unique_ptr.h> to be defined without all of std::format being compiled. We could also replace <ostream> with <bits/ostream.h> in all of <istream>, <fstream>, <sstream>, and <spanstream>. That seems more likely to cause problems for users who might be expecting <sstream> to define std::endl, for example. Although the standard doesn't guarantee that, it is more reasonable than expecting <memory> to define it! We can look into making those changes for GCC 16. libstdc++-v3/ChangeLog: PR libstdc++/99995 * include/Makefile.am: Add new header. * include/Makefile.in: Regenerate. * include/bits/unique_ptr.h: Include bits/ostream.h instead of ostream. * include/std/ostream: Include new header. * include/bits/ostream.h: New file.