iosfwd(3)

πŸ“¦ version 4.4.0, in nixpkgs unstable

πŸ¦‹ iosfwd β€” the header that's literally just vibes and forward declarations

okay so first things first: this is iosfwd(3), from the Library Functions Manual, and bestie… the NAME section is giving nothing. Like, the description is genuinely just empty:

iosfwd -

That's it. That's the whole description. Not me defending it, it's just what it is πŸ’€ (it's a forward-declaration header, so the "nothing" is kind of the point β€” iykyk).


✨ SYNOPSIS ✨

🌸 Namespaces

  • namespace std β€” yeah, the one and only. All the good stuff lives in here 🫢

πŸŽ€ Defines

  • #define _GLIBCXX_IOSFWD β€” the include guard, doing its little job so this header doesn't get read twice πŸ’…

⭐ Typedefs

so here's the part where you actually pay attention, because this list is the entire personality of this header. Every single one is a char-flavored alias, and then its wchar_t twin right after. no cap, that's the whole pattern πŸ‘‘

the char girlies:

  • typedef basic_filebuf< char > std::filebuf
  • typedef basic_fstream< char > std::fstream
  • typedef basic_ifstream< char > std::ifstream
  • typedef basic_ios< char > std::ios
  • typedef basic_iostream< char > std::iostream
  • typedef basic_istream< char > std::istream
  • typedef basic_istringstream< char > std::istringstream
  • typedef basic_ofstream< char > std::ofstream
  • typedef basic_ostream< char > std::ostream
  • typedef basic_ostringstream< char > std::ostringstream
  • typedef basic_streambuf< char > std::streambuf
  • typedef basic_stringbuf< char > std::stringbuf
  • typedef basic_stringstream< char > std::stringstream

and their wchar_t era (wide chars, wide energy) 🌈:

  • typedef basic_filebuf< wchar_t > std::wfilebuf
  • typedef basic_fstream< wchar_t > std::wfstream
  • typedef basic_ifstream< wchar_t > std::wifstream
  • typedef basic_ios< wchar_t > std::wios
  • typedef basic_iostream< wchar_t > std::wiostream
  • typedef basic_istream< wchar_t > std::wistream
  • typedef basic_istringstream< wchar_t > std::wistringstream
  • typedef basic_ofstream< wchar_t > std::wofstream
  • typedef basic_ostream< wchar_t > std::wostream
  • typedef basic_ostringstream< wchar_t > std::wostringstream
  • typedef basic_streambuf< wchar_t > std::wstreambuf
  • typedef basic_stringbuf< wchar_t > std::wstringbuf
  • typedef basic_stringstream< wchar_t > std::wstringstream

like, notice how every w-prefixed one is literally the same class with wchar_t swapped in? that's not a coincidence, that's the design, and it ate πŸ”₯


πŸ’– Detailed Description

This is a Standard C++ Library header.

That's the whole description, fr fr β€” it's short, it's sweet, it's a header. Definition in file iosfwd. πŸŽ€

lowkey important detail: this file is mostly forward declarations β€” the whole point is that you can name these types (like std::istream or std::wstringstream) without dragging in the full definitions. that's why it's so tiny and why every single line up there is a typedef. slay πŸ’…

🧚 Author

Generated automatically by Doxygen for libstdc++ from the source code.

(no human author to tag, it's a robot's work, and honestly? it did that 🫢)


and that's the page!! mwah πŸ’œ shoutout to libstdc++ for shipping this one on 21 Apr 2009 β€” yeah, she's vintage and she's iconic, we stan an OG release date β­πŸŒˆπŸ‘‘

πŸ“¦ where this page comes from