+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.
#pragma GCC system_header
-#include <locale>
-#include <ostream> // For flush()
-
_GLIBCXX_BEGIN_NAMESPACE(std)
template<typename _CharT, typename _Traits>
#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
// 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
#pragma GCC system_header
-#include <locale>
-
_GLIBCXX_BEGIN_NAMESPACE(std)
template<typename _CharT, typename _Traits>
// 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
#pragma GCC system_header
-#include <sstream>
-
_GLIBCXX_BEGIN_NAMESPACE(std)
template <class _CharT, class _Traits, class _Alloc>
#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) \
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
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
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)
#pragma GCC system_header
#include <bits/c++config.h>
-#include <ios>
+#include <iosfwd>
+#include <bits/ios_base.h>
_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;
// 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
#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>
// 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
#pragma GCC system_header
#include <ios>
+#include <locale>
+#include <ostream>
#include <limits> // For numeric_limits
_GLIBCXX_BEGIN_NAMESPACE(std)
// 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
#pragma GCC system_header
#include <ios>
+#include <locale>
_GLIBCXX_BEGIN_NAMESPACE(std)