aboutsummaryrefslogtreecommitdiff
path: root/contrib/libstdc++/include/std
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libstdc++/include/std')
-rw-r--r--contrib/libstdc++/include/std/std_fstream.h18
-rw-r--r--contrib/libstdc++/include/std/std_streambuf.h13
2 files changed, 18 insertions, 13 deletions
diff --git a/contrib/libstdc++/include/std/std_fstream.h b/contrib/libstdc++/include/std/std_fstream.h
index c3861051d40b8..838b99dc08bd8 100644
--- a/contrib/libstdc++/include/std/std_fstream.h
+++ b/contrib/libstdc++/include/std/std_fstream.h
@@ -1,6 +1,6 @@
// File based streams -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -141,10 +141,10 @@ namespace std
_M_underflow_common(bool __bump);
virtual int_type
- underflow() { return _M_underflow_common(false); }
+ underflow();
virtual int_type
- uflow() { return _M_underflow_common(true); }
+ uflow();
virtual int_type
pbackfail(int_type __c = _Traits::eof());
@@ -297,6 +297,18 @@ namespace std
basic_filebuf<wchar_t>::_M_underflow_common(bool __bump);
#endif
+ // Generic definitions.
+ template <typename _CharT, typename _Traits>
+ basic_filebuf<_CharT, _Traits>::int_type
+ basic_filebuf<_CharT, _Traits>::underflow()
+ { return _M_underflow_common(false); }
+
+ template <typename _CharT, typename _Traits>
+ basic_filebuf<_CharT, _Traits>::int_type
+ basic_filebuf<_CharT, _Traits>::uflow()
+ { return _M_underflow_common(true); }
+
+
// 27.8.1.5 Template class basic_ifstream
/**
* Derivation of general input streams, specific to files.
diff --git a/contrib/libstdc++/include/std/std_streambuf.h b/contrib/libstdc++/include/std/std_streambuf.h
index 491570ec59314..db36ed3d75dcc 100644
--- a/contrib/libstdc++/include/std/std_streambuf.h
+++ b/contrib/libstdc++/include/std/std_streambuf.h
@@ -1,6 +1,6 @@
// Stream buffer classes -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -243,7 +243,6 @@ namespace std
_M_buf_size = 0;
_M_buf_size_opt = 0;
_M_mode = ios_base::openmode(0);
- _M_buf_locale_init = false;
}
// Locales:
@@ -257,12 +256,7 @@ namespace std
locale
getloc() const
- {
- if (_M_buf_locale_init)
- return _M_buf_locale;
- else
- return locale();
- }
+ { return _M_buf_locale; }
// Buffer and positioning:
__streambuf_type*
@@ -351,7 +345,7 @@ namespace std
_M_buf_unified(false), _M_in_beg(0), _M_in_cur(0), _M_in_end(0),
_M_out_beg(0), _M_out_cur(0), _M_out_end(0),
_M_mode(ios_base::openmode(0)), _M_buf_locale(locale()),
- _M_buf_locale_init(false), _M_pback_cur_save(0), _M_pback_end_save(0),
+ _M_pback_cur_save(0), _M_pback_end_save(0),
_M_pback_init(false)
{ }
@@ -405,7 +399,6 @@ namespace std
virtual void
imbue(const locale& __loc)
{
- _M_buf_locale_init = true;
if (_M_buf_locale != __loc)
_M_buf_locale = __loc;
}