https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125371
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2026-05-18
Ever confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The fixit hints only work for undeclared types, not incomplete types.
Our <fstream> includes <ios> (via both <istream> and <ostream>) which is
required by the standard to include <iosfwd> which has a forward declaration of
istringstream.
<istream> and <ostream> are not required to include <ios>, so we could change
them to include all the headers that <ios> includes, except for <iosfwd>. That
would get rid of the forward declarations of all iostream types that we get
from <iosfwd>. That seems like an improvement, and then you'd get a fixit
because istringstream would be undeclared here.