]> gcc.gnu.org Git - gcc.git/commitdiff
PR libstdc++/28080 (partial)
authorPaolo Carlini <pcarlini@suse.de>
Tue, 27 Feb 2007 17:48:09 +0000 (17:48 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 27 Feb 2007 17:48:09 +0000 (17:48 +0000)
2007-02-27  Paolo Carlini  <pcarlini@suse.de>

PR libstdc++/28080 (partial)
* include/std/bitset: Do not include <ios>, <iosfwd> is enough.
(operator>>(std::basic_istream<>&, bitset<>&)): Tweak, refer to
ios_base as a base of basic_istream.
* include/std/iomanip: Do not include <ios>, <iosfwd> +
<bits/ios_base.h> is enough.
* include/std/iosfwd: Do not include <cctype> here...
* include/bits/locale_facets.h: ... do it here, when needed.
* include/bits/ostream.tcc: Clean up, do not include <locale> here...
* include/std/ostream: ... here instead.
* include/bits/istream.tcc: Likewise for <locale> and <ostream>...
* include/std/istream: ... here.
* include/bits/sstream.tcc: Do not include <sstream>.

From-SVN: r122380

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/istream.tcc
libstdc++-v3/include/bits/locale_facets.h
libstdc++-v3/include/bits/ostream.tcc
libstdc++-v3/include/bits/sstream.tcc
libstdc++-v3/include/std/bitset
libstdc++-v3/include/std/iomanip
libstdc++-v3/include/std/iosfwd
libstdc++-v3/include/std/istream
libstdc++-v3/include/std/ostream

index 38a930be54efa0037440e95acef759f15e3ff044..983c782ffec5ad4a0a37b581c8c1d779ca8dbe91 100644 (file)
@@ -1,3 +1,19 @@
+2007-02-27  Paolo Carlini  <pcarlini@suse.de>
+
+       PR libstdc++/28080 (partial)
+       * include/std/bitset: Do not include <ios>, <iosfwd> is enough.
+       (operator>>(std::basic_istream<>&, bitset<>&)): Tweak, refer to
+       ios_base as a base of basic_istream.
+       * include/std/iomanip: Do not include <ios>, <iosfwd> + 
+       <bits/ios_base.h> is enough.
+       * include/std/iosfwd: Do not include <cctype> here...
+       * include/bits/locale_facets.h: ... do it here, when needed.
+       * include/bits/ostream.tcc: Clean up, do not include <locale> here...
+       * include/std/ostream: ... here instead.
+       * include/bits/istream.tcc: Likewise for <locale> and <ostream>...
+       * include/std/istream: ... here.
+       * include/bits/sstream.tcc: Do not include <sstream>.
+
 2007-02-27  Richard Guenther  <rguenther@suse.de>
 
        * acinclude.m4: Adjust regular expression for ld version extraction.
index c6a884650ddd84c49491862ac977e51869f364c7..8714c9f2f65b977e27e061192c128c1f26a36904 100644 (file)
@@ -43,9 +43,6 @@
 
 #pragma GCC system_header
 
-#include <locale>
-#include <ostream> // For flush()
-
 _GLIBCXX_BEGIN_NAMESPACE(std)
 
   template<typename _CharT, typename _Traits>
index 0f7cdd3a3ff53fc91b4c1cd83c47958ace186b14..7746d1dc7a159c64c6c8d7d075d70390adfa2480 100644 (file)
@@ -45,6 +45,7 @@
 
 #include <ctime>       // For struct tm
 #include <cwctype>     // For wctype_t
+#include <cctype>
 #include <bits/ctype_base.h>   
 #include <iosfwd>
 #include <bits/ios_base.h>  // For ios_base, ios_base::iostate
index db09d0a99e567aedd167b77738fca8bae584d75e..382f0181493998196e01ea4a141cafdc3b694549 100644 (file)
@@ -1,6 +1,7 @@
 // ostream classes -*- C++ -*-
 
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -42,8 +43,6 @@
 
 #pragma GCC system_header
 
-#include <locale>
-
 _GLIBCXX_BEGIN_NAMESPACE(std)
 
   template<typename _CharT, typename _Traits>
index 4de1c8124b57a22493d292915cee37e4ed76c0fe..2e642390f5c48fa1e76f1fe234e827c6ed659f32 100644 (file)
@@ -1,6 +1,7 @@
 // String based streams -*- C++ -*-
 
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -42,8 +43,6 @@
 
 #pragma GCC system_header
 
-#include <sstream>
-
 _GLIBCXX_BEGIN_NAMESPACE(std)
 
   template <class _CharT, class _Traits, class _Alloc>
index ec098175012fcc153073bcfe4ff3d6ffb3bef84e..b0bc55545f5ae7fac044f649ad01c3719aa874c2 100644 (file)
@@ -55,7 +55,7 @@
 #include <string>
 #include <bits/functexcept.h>   // For invalid_argument, out_of_range,
                                 // overflow_error
-#include <ios>
+#include <iosfwd>
 
 #define _GLIBCXX_BITSET_BITS_PER_WORD  (__CHAR_BIT__ * sizeof(unsigned long))
 #define _GLIBCXX_BITSET_WORDS(__n) \
@@ -1227,12 +1227,15 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
     std::basic_istream<_CharT, _Traits>&
     operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
     {
-      typedef typename _Traits::char_type char_type;
+      typedef typename _Traits::char_type          char_type;
+      typedef std::basic_istream<_CharT, _Traits>  __istream_type;
+      typedef typename __istream_type::ios_base    __ios_base;
+
       std::basic_string<_CharT, _Traits> __tmp;
       __tmp.reserve(_Nb);
 
-      std::ios_base::iostate __state = std::ios_base::goodbit;
-      typename std::basic_istream<_CharT, _Traits>::sentry __sentry(__is);
+      typename __ios_base::iostate __state = __ios_base::goodbit;
+      typename __istream_type::sentry __sentry(__is);
       if (__sentry)
        {
          try
@@ -1249,7 +1252,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
                  typename _Traits::int_type __c1 = __buf->sbumpc();
                  if (_Traits::eq_int_type(__c1, __eof))
                    {
-                     __state |= std::ios_base::eofbit;
+                     __state |= __ios_base::eofbit;
                      break;
                    }
                  else
@@ -1262,18 +1265,18 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
                      else if (_Traits::eq_int_type(__buf->sputbackc(__c2),
                                                    __eof))
                        {
-                         __state |= std::ios_base::failbit;
+                         __state |= __ios_base::failbit;
                          break;
                        }
                    }
                }
            }
          catch(...)
-           { __is._M_setstate(std::ios_base::badbit); }
+           { __is._M_setstate(__ios_base::badbit); }
        }
 
       if (__tmp.empty() && _Nb)
-       __state |= std::ios_base::failbit;
+       __state |= __ios_base::failbit;
       else
        __x._M_copy_from_string(__tmp, static_cast<size_t>(0), _Nb);
       if (__state)
index a1bb4149304d6ad16e4ec541bfad88d517d739c0..13079e4fb04eef204497776824aefcbac134379d 100644 (file)
@@ -43,7 +43,8 @@
 #pragma GCC system_header
 
 #include <bits/c++config.h>
-#include <ios>
+#include <iosfwd>
+#include <bits/ios_base.h>
 
 _GLIBCXX_BEGIN_NAMESPACE(std)
 
@@ -111,7 +112,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
 
   template<typename _CharT, typename _Traits>
     inline basic_ostream<_CharT, _Traits>& 
-    operator<<(basic_ostream<_CharT,_Traits>& __os, _Setiosflags __f)
+    operator<<(basic_ostream<_CharT, _Traits>& __os, _Setiosflags __f)
     { 
       __os.setf(__f._M_mask); 
       return __os; 
index a4d0c3fdf19991dc7fe9baf1af266064e474763e..d2da12bf6a3c73e65c98439c227c39345364e860 100644 (file)
@@ -1,6 +1,7 @@
 // Forwarding declarations -*- C++ -*-
 
-// Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2005
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -44,7 +45,6 @@
 #include <bits/c++config.h>
 #include <bits/c++locale.h> 
 #include <bits/c++io.h> 
-#include <cctype>              // For isspace, etc.
 #include <bits/stringfwd.h>    // For string forward declarations.
 #include <bits/postypes.h>
 #include <bits/functexcept.h>
index e81c9cd9252b6b576beaac3efc4a449863cfb7e9..d6b0dfb08163e84da7ee7d21ca890e8263dd3bfb 100644 (file)
@@ -1,6 +1,7 @@
 // Input streams -*- C++ -*-
 
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -42,6 +43,8 @@
 #pragma GCC system_header
 
 #include <ios>
+#include <locale>
+#include <ostream>
 #include <limits> // For numeric_limits
 
 _GLIBCXX_BEGIN_NAMESPACE(std)
index e97b7a4b410fc4b784baf68ff6eda35cbf17a553..2a84f808d7e134000ba517705a798def541e7645 100644 (file)
@@ -1,6 +1,7 @@
 // Output streams -*- C++ -*-
 
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -42,6 +43,7 @@
 #pragma GCC system_header
 
 #include <ios>
+#include <locale>
 
 _GLIBCXX_BEGIN_NAMESPACE(std)
 
This page took 0.079765 seconds and 5 git commands to generate.