iostream 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. // Standard iostream objects -*- C++ -*-
  2. // Copyright (C) 1997-2022 Free Software Foundation, Inc.
  3. //
  4. // This file is part of the GNU ISO C++ Library. This library is free
  5. // software; you can redistribute it and/or modify it under the
  6. // terms of the GNU General Public License as published by the
  7. // Free Software Foundation; either version 3, or (at your option)
  8. // any later version.
  9. // This library is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. // Under Section 7 of GPL version 3, you are granted additional
  14. // permissions described in the GCC Runtime Library Exception, version
  15. // 3.1, as published by the Free Software Foundation.
  16. // You should have received a copy of the GNU General Public License and
  17. // a copy of the GCC Runtime Library Exception along with this program;
  18. // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  19. // <http://www.gnu.org/licenses/>.
  20. /** @file include/iostream
  21. * This is a Standard C++ Library header.
  22. */
  23. //
  24. // ISO C++ 14882: 27.3 Standard iostream objects
  25. //
  26. #ifndef _GLIBCXX_IOSTREAM
  27. #define _GLIBCXX_IOSTREAM 1
  28. #pragma GCC system_header
  29. #include <bits/c++config.h>
  30. #include <ostream>
  31. #include <istream>
  32. namespace std _GLIBCXX_VISIBILITY(default)
  33. {
  34. _GLIBCXX_BEGIN_NAMESPACE_VERSION
  35. /**
  36. * @name Standard Stream Objects
  37. *
  38. * The &lt;iostream&gt; header declares the eight <em>standard stream
  39. * objects</em>. For other declarations, see
  40. * http://gcc.gnu.org/onlinedocs/libstdc++/manual/io.html
  41. * and the @link iosfwd I/O forward declarations @endlink
  42. *
  43. * They are required by default to cooperate with the global C
  44. * library's @c FILE streams, and to be available during program
  45. * startup and termination. For more information, see the section of the
  46. * manual linked to above.
  47. */
  48. ///@{
  49. extern istream cin; /// Linked to standard input
  50. extern ostream cout; /// Linked to standard output
  51. extern ostream cerr; /// Linked to standard error (unbuffered)
  52. extern ostream clog; /// Linked to standard error (buffered)
  53. #ifdef _GLIBCXX_USE_WCHAR_T
  54. extern wistream wcin; /// Linked to standard input
  55. extern wostream wcout; /// Linked to standard output
  56. extern wostream wcerr; /// Linked to standard error (unbuffered)
  57. extern wostream wclog; /// Linked to standard error (buffered)
  58. #endif
  59. ///@}
  60. // For construction of filebuffers for cout, cin, cerr, clog et. al.
  61. static ios_base::Init __ioinit;
  62. _GLIBCXX_END_NAMESPACE_VERSION
  63. } // namespace
  64. #endif /* _GLIBCXX_IOSTREAM */