iosfwd 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. // -*- C++ -*-
  2. //===--------------------------- iosfwd -----------------------------------===//
  3. //
  4. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  5. // See https://llvm.org/LICENSE.txt for license information.
  6. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  7. //
  8. //===----------------------------------------------------------------------===//
  9. #ifndef _LIBCPP_IOSFWD
  10. #define _LIBCPP_IOSFWD
  11. /*
  12. iosfwd synopsis
  13. namespace std
  14. {
  15. template<class charT> struct char_traits;
  16. template<> struct char_traits<char>;
  17. template<> struct char_traits<char8_t>; // C++20
  18. template<> struct char_traits<char16_t>;
  19. template<> struct char_traits<char32_t>;
  20. template<> struct char_traits<wchar_t>;
  21. template<class T> class allocator;
  22. class ios_base;
  23. template <class charT, class traits = char_traits<charT> > class basic_ios;
  24. template <class charT, class traits = char_traits<charT> > class basic_streambuf;
  25. template <class charT, class traits = char_traits<charT> > class basic_istream;
  26. template <class charT, class traits = char_traits<charT> > class basic_ostream;
  27. template <class charT, class traits = char_traits<charT> > class basic_iostream;
  28. template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
  29. class basic_stringbuf;
  30. template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
  31. class basic_istringstream;
  32. template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
  33. class basic_ostringstream;
  34. template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
  35. class basic_stringstream;
  36. template <class charT, class traits = char_traits<charT> > class basic_filebuf;
  37. template <class charT, class traits = char_traits<charT> > class basic_ifstream;
  38. template <class charT, class traits = char_traits<charT> > class basic_ofstream;
  39. template <class charT, class traits = char_traits<charT> > class basic_fstream;
  40. template <class charT, class traits = char_traits<charT> > class istreambuf_iterator;
  41. template <class charT, class traits = char_traits<charT> > class ostreambuf_iterator;
  42. typedef basic_ios<char> ios;
  43. typedef basic_ios<wchar_t> wios;
  44. typedef basic_streambuf<char> streambuf;
  45. typedef basic_istream<char> istream;
  46. typedef basic_ostream<char> ostream;
  47. typedef basic_iostream<char> iostream;
  48. typedef basic_stringbuf<char> stringbuf;
  49. typedef basic_istringstream<char> istringstream;
  50. typedef basic_ostringstream<char> ostringstream;
  51. typedef basic_stringstream<char> stringstream;
  52. typedef basic_filebuf<char> filebuf;
  53. typedef basic_ifstream<char> ifstream;
  54. typedef basic_ofstream<char> ofstream;
  55. typedef basic_fstream<char> fstream;
  56. typedef basic_streambuf<wchar_t> wstreambuf;
  57. typedef basic_istream<wchar_t> wistream;
  58. typedef basic_ostream<wchar_t> wostream;
  59. typedef basic_iostream<wchar_t> wiostream;
  60. typedef basic_stringbuf<wchar_t> wstringbuf;
  61. typedef basic_istringstream<wchar_t> wistringstream;
  62. typedef basic_ostringstream<wchar_t> wostringstream;
  63. typedef basic_stringstream<wchar_t> wstringstream;
  64. typedef basic_filebuf<wchar_t> wfilebuf;
  65. typedef basic_ifstream<wchar_t> wifstream;
  66. typedef basic_ofstream<wchar_t> wofstream;
  67. typedef basic_fstream<wchar_t> wfstream;
  68. template <class state> class fpos;
  69. typedef fpos<char_traits<char>::state_type> streampos;
  70. typedef fpos<char_traits<wchar_t>::state_type> wstreampos;
  71. } // std
  72. */
  73. #include <__config>
  74. #include <wchar.h> // for mbstate_t
  75. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  76. #pragma GCC system_header
  77. #endif
  78. _LIBCPP_BEGIN_NAMESPACE_STD
  79. class _LIBCPP_TYPE_VIS ios_base;
  80. template<class _CharT> struct _LIBCPP_TEMPLATE_VIS char_traits;
  81. template<> struct char_traits<char>;
  82. #ifndef _LIBCPP_NO_HAS_CHAR8_T
  83. template<> struct char_traits<char8_t>;
  84. #endif
  85. template<> struct char_traits<char16_t>;
  86. template<> struct char_traits<char32_t>;
  87. template<> struct char_traits<wchar_t>;
  88. template<class _Tp> class _LIBCPP_TEMPLATE_VIS allocator;
  89. template <class _CharT, class _Traits = char_traits<_CharT> >
  90. class _LIBCPP_TEMPLATE_VIS basic_ios;
  91. template <class _CharT, class _Traits = char_traits<_CharT> >
  92. class _LIBCPP_TEMPLATE_VIS basic_streambuf;
  93. template <class _CharT, class _Traits = char_traits<_CharT> >
  94. class _LIBCPP_TEMPLATE_VIS basic_istream;
  95. template <class _CharT, class _Traits = char_traits<_CharT> >
  96. class _LIBCPP_TEMPLATE_VIS basic_ostream;
  97. template <class _CharT, class _Traits = char_traits<_CharT> >
  98. class _LIBCPP_TEMPLATE_VIS basic_iostream;
  99. template <class _CharT, class _Traits = char_traits<_CharT>,
  100. class _Allocator = allocator<_CharT> >
  101. class _LIBCPP_TEMPLATE_VIS basic_stringbuf;
  102. template <class _CharT, class _Traits = char_traits<_CharT>,
  103. class _Allocator = allocator<_CharT> >
  104. class _LIBCPP_TEMPLATE_VIS basic_istringstream;
  105. template <class _CharT, class _Traits = char_traits<_CharT>,
  106. class _Allocator = allocator<_CharT> >
  107. class _LIBCPP_TEMPLATE_VIS basic_ostringstream;
  108. template <class _CharT, class _Traits = char_traits<_CharT>,
  109. class _Allocator = allocator<_CharT> >
  110. class _LIBCPP_TEMPLATE_VIS basic_stringstream;
  111. template <class _CharT, class _Traits = char_traits<_CharT> >
  112. class _LIBCPP_TEMPLATE_VIS basic_filebuf;
  113. template <class _CharT, class _Traits = char_traits<_CharT> >
  114. class _LIBCPP_TEMPLATE_VIS basic_ifstream;
  115. template <class _CharT, class _Traits = char_traits<_CharT> >
  116. class _LIBCPP_TEMPLATE_VIS basic_ofstream;
  117. template <class _CharT, class _Traits = char_traits<_CharT> >
  118. class _LIBCPP_TEMPLATE_VIS basic_fstream;
  119. template <class _CharT, class _Traits = char_traits<_CharT> >
  120. class _LIBCPP_TEMPLATE_VIS istreambuf_iterator;
  121. template <class _CharT, class _Traits = char_traits<_CharT> >
  122. class _LIBCPP_TEMPLATE_VIS ostreambuf_iterator;
  123. typedef basic_ios<char> ios;
  124. typedef basic_ios<wchar_t> wios;
  125. typedef basic_streambuf<char> streambuf;
  126. typedef basic_istream<char> istream;
  127. typedef basic_ostream<char> ostream;
  128. typedef basic_iostream<char> iostream;
  129. typedef basic_stringbuf<char> stringbuf;
  130. typedef basic_istringstream<char> istringstream;
  131. typedef basic_ostringstream<char> ostringstream;
  132. typedef basic_stringstream<char> stringstream;
  133. typedef basic_filebuf<char> filebuf;
  134. typedef basic_ifstream<char> ifstream;
  135. typedef basic_ofstream<char> ofstream;
  136. typedef basic_fstream<char> fstream;
  137. typedef basic_streambuf<wchar_t> wstreambuf;
  138. typedef basic_istream<wchar_t> wistream;
  139. typedef basic_ostream<wchar_t> wostream;
  140. typedef basic_iostream<wchar_t> wiostream;
  141. typedef basic_stringbuf<wchar_t> wstringbuf;
  142. typedef basic_istringstream<wchar_t> wistringstream;
  143. typedef basic_ostringstream<wchar_t> wostringstream;
  144. typedef basic_stringstream<wchar_t> wstringstream;
  145. typedef basic_filebuf<wchar_t> wfilebuf;
  146. typedef basic_ifstream<wchar_t> wifstream;
  147. typedef basic_ofstream<wchar_t> wofstream;
  148. typedef basic_fstream<wchar_t> wfstream;
  149. template <class _State> class _LIBCPP_TEMPLATE_VIS fpos;
  150. typedef fpos<mbstate_t> streampos;
  151. typedef fpos<mbstate_t> wstreampos;
  152. #ifndef _LIBCPP_NO_HAS_CHAR8_T
  153. typedef fpos<mbstate_t> u8streampos;
  154. #endif
  155. #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
  156. typedef fpos<mbstate_t> u16streampos;
  157. typedef fpos<mbstate_t> u32streampos;
  158. #endif // _LIBCPP_HAS_NO_UNICODE_CHARS
  159. #if defined(_NEWLIB_VERSION)
  160. // On newlib, off_t is 'long int'
  161. typedef long int streamoff; // for char_traits in <string>
  162. #else
  163. typedef long long streamoff; // for char_traits in <string>
  164. #endif
  165. template <class _CharT, // for <stdexcept>
  166. class _Traits = char_traits<_CharT>,
  167. class _Allocator = allocator<_CharT> >
  168. class _LIBCPP_TEMPLATE_VIS basic_string;
  169. typedef basic_string<char, char_traits<char>, allocator<char> > string;
  170. typedef basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstring;
  171. // Include other forward declarations here
  172. template <class _Tp, class _Alloc = allocator<_Tp> >
  173. class _LIBCPP_TEMPLATE_VIS vector;
  174. _LIBCPP_END_NAMESPACE_STD
  175. #endif // _LIBCPP_IOSFWD