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