Standard library header <iosfwd>

From cppreference.com
< cpp‎ | header
 
 
Standard Library headers
Note: a slash '/' in a revision mark means that the header was deprecated and/or removed.
Language Support
Concepts
<concepts> (C++20)
Diagnostics
<system_error> (C++11)
General utilities
<bitset>
<tuple> (C++11)
<optional> (C++17)
<any> (C++17)
<variant> (C++17)
<type_traits> (C++11)
<ratio> (C++11)
<chrono> (C++11)
Strings
<charconv> (C++17)
<format> (C++20)

<cwchar>
<cuchar> (C++11)

Localization
<codecvt> (C++11/17)

Containers
<span> (C++20)
<array> (C++11)
<vector>
Iterators
<iterator>
Ranges
<ranges> (C++20)
Algorithms
<execution> (C++17)
Numerics
<bit> (C++20)
<numbers> (C++20)
<cfenv> (C++11)
<cmath>
Input/Output
<cstdio>
<cinttypes> (C++11)
<strstream> (C++98/)

Regular expressions
<regex> (C++11)
Filesystem support
<filesystem> (C++17)
Thread support
<thread> (C++11)
<atomic> (C++11)
<mutex> (C++11)
<shared_mutex> (C++14)
<condition_variable> (C++11)  
<future> (C++11)
<stop_token> (C++20)
<semaphore> (C++20)

<latch> (C++20)
<barrier> (C++20)

C compatibility
<cstdbool> (C++11/17/20)
<ccomplex> (C++11/17/20)
<ctgmath> (C++11/17/20)
<cstdalign> (C++11/17/20)
<ciso646> (until C++20)
<stdatomic.h>
 

This header contains forward declarations for the Input/output library.

Forward declarations

Defined in header <string>
std::char_traits Class Template which describes properties of a character type (class template)
std::char_traits<char> (class template specialization)
std::char_traits<wchar_t> (class template specialization)
std::char_traits<char8_t> (C++20) (class template specialization)
std::char_traits<char16_t> (C++11) (class template specialization)
std::char_traits<char32_t> (C++11) (class template specialization)
Defined in header <memory>
the default allocator
(class template)
Defined in header <ios>
manages an arbitrary stream buffer
(class template)
represents absolute position in a stream or a file
(class template)
Defined in header <streambuf>
abstracts a raw device
(class template)
Defined in header <ostream>
wraps a given abstract device (std::basic_streambuf)
and provides high-level output interface
(class template)
Defined in header <istream>
wraps a given abstract device (std::basic_streambuf)
and provides high-level input interface
(class template)
wraps a given abstract device (std::basic_streambuf)
and provides high-level input/output interface
(class template)
Defined in header <fstream>
implements raw file device
(class template)
implements high-level file stream input operations
(class template)
implements high-level file stream output operations
(class template)
implements high-level file stream input/output operations
(class template)
Defined in header <sstream>
implements raw string device
(class template)
implements high-level string stream input operations
(class template)
implements high-level string stream output operations
(class template)
implements high-level string stream input/output operations
(class template)
Defined in header <syncstream>
synchronized output device wrapper
(class template)
synchronized output stream wrapper
(class template)
Defined in header <spanstream>
implements raw fixed character buffer device
(class template)
implements fixed character buffer input operations
(class template)
implements fixed character buffer output operations
(class template)
implements fixed character buffer input/output operations
(class template)
Defined in header <strstream>
(deprecated in C++98)
implements raw character array device
(class)
(deprecated in C++98)
implements character array input operations
(class)
(deprecated in C++98)
implements character array output operations
(class)
(deprecated in C++98)
implements character array input/output operations
(class)

Typedefs and specializations

std::streampos std::fpos<std::char_traits<char>::state_type>
std::wstreampos std::fpos<std::char_traits<wchar_t>::state_type>
std::u8streampos std::fpos<std::char_traits<char8_t>::state_type>
std::u16streampos std::fpos<std::char_traits<char16_t>::state_type>
std::u32streampos std::fpos<std::char_traits<char32_t>::state_type>
In addition, for each class template std::basic_T declared in this header, std::T and std::wT are declared as a synonym of std::basic_T<char> and std::basic_T<wchar_t> respectively.

Synopsis

namespace std {
  template<class CharT> struct char_traits;
  template<> struct char_traits<char>;
  template<> struct char_traits<char8_t>;
  template<> struct char_traits<char16_t>;
  template<> struct char_traits<char32_t>;
  template<> struct char_traits<wchar_t>;
 
  template<class T> class allocator;
 
  template<class CharT, class Traits = char_traits<CharT>>
    class basic_ios;
  template<class CharT, class Traits = char_traits<CharT>>
    class basic_streambuf;
  template<class CharT, class Traits = char_traits<CharT>>
    class basic_istream;
  template<class CharT, class Traits = char_traits<CharT>>
    class basic_ostream;
  template<class CharT, class Traits = char_traits<CharT>>
    class basic_iostream;
 
  template<class CharT, class Traits = char_traits<CharT>,
           class Allocator = allocator<CharT>>
    class basic_stringbuf;
  template<class CharT, class Traits = char_traits<CharT>,
           class Allocator = allocator<CharT>>
    class basic_istringstream;
  template<class CharT, class Traits = char_traits<CharT>,
           class Allocator = allocator<CharT>>
    class basic_ostringstream;
  template<class CharT, class Traits = char_traits<CharT>,
           class Allocator = allocator<CharT>>
    class basic_stringstream;
 
  template<class CharT, class Traits = char_traits<CharT>>
    class basic_filebuf;
  template<class CharT, class Traits = char_traits<CharT>>
    class basic_ifstream;
  template<class CharT, class Traits = char_traits<CharT>>
    class basic_ofstream;
  template<class CharT, class Traits = char_traits<CharT>>
    class basic_fstream;
 
  template<class CharT, class Traits = char_traits<CharT>,
           class Allocator = allocator<CharT>>
    class basic_syncbuf;
  template<class CharT, class Traits = char_traits<CharT>,
           class Allocator = allocator<CharT>>
    class basic_osyncstream;
 
  template<class CharT, class Traits = char_traits<CharT>>
    class basic_spanbuf;
  template<class CharT, class Traits = char_traits<CharT>>
    class basic_ispanstream;
  template<class CharT, class Traits = char_traits<CharT>>
    class basic_ospanstream;
  template<class CharT, class Traits = char_traits<CharT>>
    class basic_spanstream;
 
  template<class CharT, class Traits = char_traits<CharT>>
    class istreambuf_iterator;
  template<class CharT, class Traits = char_traits<CharT>>
    class ostreambuf_iterator;
 
  using ios  = basic_ios<char>;
  using wios = basic_ios<wchar_t>;
 
  using streambuf = basic_streambuf<char>;
  using istream   = basic_istream<char>;
  using ostream   = basic_ostream<char>;
  using iostream  = basic_iostream<char>;
 
  using stringbuf     = basic_stringbuf<char>;
  using istringstream = basic_istringstream<char>;
  using ostringstream = basic_ostringstream<char>;
  using stringstream  = basic_stringstream<char>;
 
  using filebuf  = basic_filebuf<char>;
  using ifstream = basic_ifstream<char>;
  using ofstream = basic_ofstream<char>;
  using fstream  = basic_fstream<char>;
 
  using syncbuf     = basic_syncbuf<char>;
  using osyncstream = basic_osyncstream<char>;
 
  using spanbuf     = basic_spanbuf<char>;
  using ispanstream = basic_ispanstream<char>;
  using ospanstream = basic_ospanstream<char>;
  using spanstream  = basic_spanstream<char>;
 
  using wstreambuf = basic_streambuf<wchar_t>;
  using wistream   = basic_istream<wchar_t>;
  using wostream   = basic_ostream<wchar_t>;
  using wiostream  = basic_iostream<wchar_t>;
 
  using wstringbuf     = basic_stringbuf<wchar_t>;
  using wistringstream = basic_istringstream<wchar_t>;
  using wostringstream = basic_ostringstream<wchar_t>;
  using wstringstream  = basic_stringstream<wchar_t>;
 
  using wfilebuf  = basic_filebuf<wchar_t>;
  using wifstream = basic_ifstream<wchar_t>;
  using wofstream = basic_ofstream<wchar_t>;
  using wfstream  = basic_fstream<wchar_t>;
 
  using wsyncbuf     = basic_syncbuf<wchar_t>;
  using wosyncstream = basic_osyncstream<wchar_t>;
 
  using wspanbuf     = basic_spanbuf<wchar_t>;
  using wispanstream = basic_ispanstream<wchar_t>;
  using wospanstream = basic_ospanstream<wchar_t>;
  using wspanstream  = basic_spanstream<wchar_t>;
 
  template<class State> class fpos;
  using streampos = fpos<char_traits<char>::state_type>;
  using wstreampos = fpos<char_traits<wchar_t>::state_type>;
  using u8streampos = fpos<char_traits<char8_t>::state_type>;
  using u16streampos = fpos<char_traits<char16_t>::state_type>;
  using u32streampos = fpos<char_traits<char32_t>::state_type>;
}
 
// deprecated
namespace std {
  class strstreambuf;
  class istrstream;
  class ostrstream;
  class strstream;
}