istream: Fix comments in the light of DR60 + N3168.
[gcc.git] / libstdc++-v3 / include / std / istream
index 542396b123afacaf07fd47e13aef8b899bcca6c7..fb393921fd9a28ab2ee8a58e8caff3ece8df3023 100644 (file)
@@ -1,7 +1,7 @@
 // Input streams -*- C++ -*-
 
 // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-// 2006, 2007, 2008, 2009, 2010
+// 2006, 2007, 2008, 2009, 2010, 2011
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -28,7 +28,7 @@
 // ISO C++ 14882: 27.6.1  Input streams
 //
 
-/** @file istream
+/** @file include/istream
  *  This is a Standard C++ Library header.
  */
 
@@ -40,7 +40,9 @@
 #include <ios>
 #include <ostream>
 
-_GLIBCXX_BEGIN_NAMESPACE(std)
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
 
   // [27.6.1.1] Template class basic_istream
   /**
@@ -493,8 +495,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
        *  If @c rdbuf() is null or if @c sputbackc() fails, sets badbit in
        *  the error state.
        *
-       *  @note  Since no characters are extracted, the next call to
-       *         @c gcount() will return 0, as required by DR 60.
+       *  @note  This function first clears eofbit.  Since no characters
+       *         are extracted, the next call to @c gcount() will return 0,
+       *         as required by DR 60.
       */
       __istream_type& 
       putback(char_type __c);
@@ -508,8 +511,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
        *  If @c rdbuf() is null or if @c sungetc() fails, sets badbit in
        *  the error state.
        *
-       *  @note  Since no characters are extracted, the next call to
-       *         @c gcount() will return 0, as required by DR 60.
+       *  @note  This function first clears eofbit.  Since no characters
+       *         are extracted, the next call to @c gcount() will return 0,
+       *         as required by DR 60.
       */
       __istream_type& 
       unget();
@@ -541,9 +545,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
        *
        *  @note  This function does not count the number of characters
        *         extracted, if any, and therefore does not affect the next
-       *         call to @c gcount().
+       *         call to @c gcount().  At variance with putback, unget and
+       *         seekg, eofbit is not cleared first.
       */
-      pos_type 
+      pos_type
       tellg();
 
       /**
@@ -554,11 +559,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
        *  If @c fail() is not true, calls @c rdbuf()->pubseekpos(pos).  If
        *  that function fails, sets failbit.
        *
-       *  @note  This function does not count the number of characters
-       *         extracted, if any, and therefore does not affect the next
-       *         call to @c gcount().
+       *  @note  This function first clears eofbit.  It does not count the
+       *         number of characters extracted, if any, and therefore does
+       *         not affect the next call to @c gcount().
       */
-      __istream_type& 
+      __istream_type&
       seekg(pos_type);
 
       /**
@@ -570,9 +575,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
        *  If @c fail() is not true, calls @c rdbuf()->pubseekoff(off,dir).
        *  If that function fails, sets failbit.
        *
-       *  @note  This function does not count the number of characters
-       *         extracted, if any, and therefore does not affect the next
-       *         call to @c gcount().
+       *  @note  This function first clears eofbit.  It does not count the
+       *         number of characters extracted, if any, and therefore does
+       *         not affect the next call to @c gcount().
       */
       __istream_type& 
       seekg(off_type, ios_base::seekdir);
@@ -848,10 +853,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     { return (__is >> __x); }
 #endif // __GXX_EXPERIMENTAL_CXX0X__
 
-_GLIBCXX_END_NAMESPACE
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace
 
-#ifndef _GLIBCXX_EXPORT_TEMPLATE
-# include <bits/istream.tcc>
-#endif
+#include <bits/istream.tcc>
 
 #endif /* _GLIBCXX_ISTREAM */