aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2002-02-16 00:19:13 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2002-02-16 00:19:13 +0000
commita32e3c097ece9d1f02ec88b9c4a64aa62522c0a8 (patch)
tree3ce77f3b8272c41aa4b08f4fb58573bdab29ffee
parent13e58269a61bc02a73910439915e95352af9a56d (diff)
downloadgcc-a32e3c097ece9d1f02ec88b9c4a64aa62522c0a8.zip
gcc-a32e3c097ece9d1f02ec88b9c4a64aa62522c0a8.tar.gz
gcc-a32e3c097ece9d1f02ec88b9c4a64aa62522c0a8.tar.bz2
Tune for size.
2002-02-15 Benjamin Kosnik <bkoz@redhat.com> Tune for size. * src/string-inst.cc (string::_Rep::_S_terminal): Remove redundant explicit instantiation. (string::_Rep::_S_max_size): Same. * include/bits/basic_string.tcc: Add extern explicit instantiations for string, wstring. * include/bits/basic_ios.tcc: Add extern explicit instantiations for ios, wios. * include/bits/streambuf.tcc: Same, for streambuf, wstreambuf. * include/bits/istream.tcc: Same, for istream, wistream. * include/bits/ostream.tcc: Same for ostream, wostream, iostream, wiostream. * include/bits/sstream.tcc: Same, for stringbuf, wstringbuf, istringstream, wistringstream, ostringstream, wostringstream, stringstream, wstringstream. * include/bits/fstream.tcc: Same, for filebuf, wfilebuf, ifstream, wifstream, ofstream, wofstream, fstream, wfstream. * src/misc-inst.cc: Correct comments. Add iomanip instantiations for wide streams. * include/std/std_iomanip.h: Same. * include/bits/locale_facets.tcc: Same. * include/std/std_streambuf.h: Correct _GLIBCPP_FULLY_COMPLIANT_HEADERS guard. * include/std/std_sstream.h: Same. * include/std/std_ostream.h: Same. * include/std/std_istream.h: Same. * include/std/std_fstream.h: Same. * include/std/std_streambuf.h: Add definitions for private copy ctor and assignment operator. * include/std/std_istream.h: Remove declared but undefined copy ctor and assignment operator. This is taken care of in ios_base, so adding it in the derived class as well is superfluous. * include/std/std_ostream.h: Same. * include/bits/basic_ios.h (basic_ios::clear): Don't inline. * include/bits/basic_ios.tcc (basic_ios::clear): Move definition here. From-SVN: r49798
-rw-r--r--libstdc++-v3/ChangeLog41
-rw-r--r--libstdc++-v3/include/bits/basic_ios.h44
-rw-r--r--libstdc++-v3/include/bits/basic_ios.tcc18
-rw-r--r--libstdc++-v3/include/bits/basic_string.tcc31
-rw-r--r--libstdc++-v3/include/bits/fstream.tcc12
-rw-r--r--libstdc++-v3/include/bits/istream.tcc26
-rw-r--r--libstdc++-v3/include/bits/locale_facets.tcc53
-rw-r--r--libstdc++-v3/include/bits/ostream.tcc32
-rw-r--r--libstdc++-v3/include/bits/sstream.tcc12
-rw-r--r--libstdc++-v3/include/bits/streambuf.tcc15
-rw-r--r--libstdc++-v3/include/std/std_fstream.h2
-rw-r--r--libstdc++-v3/include/std/std_iomanip.h30
-rw-r--r--libstdc++-v3/include/std/std_istream.h13
-rw-r--r--libstdc++-v3/include/std/std_ostream.h12
-rw-r--r--libstdc++-v3/include/std/std_sstream.h2
-rw-r--r--libstdc++-v3/include/std/std_streambuf.h8
-rw-r--r--libstdc++-v3/src/locale-inst.cc16
-rw-r--r--libstdc++-v3/src/misc-inst.cc73
-rw-r--r--libstdc++-v3/src/string-inst.cc6
19 files changed, 324 insertions, 122 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index f755984..efc9bad 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,44 @@
+2002-02-15 Benjamin Kosnik <bkoz@redhat.com>
+
+ Tune for size.
+ * src/string-inst.cc (string::_Rep::_S_terminal): Remove redundant
+ explicit instantiation.
+ (string::_Rep::_S_max_size): Same.
+ * include/bits/basic_string.tcc: Add extern explicit
+ instantiations for string, wstring.
+ * include/bits/basic_ios.tcc: Add extern explicit instantiations
+ for ios, wios.
+ * include/bits/streambuf.tcc: Same, for streambuf, wstreambuf.
+ * include/bits/istream.tcc: Same, for istream, wistream.
+ * include/bits/ostream.tcc: Same for ostream, wostream, iostream,
+ wiostream.
+ * include/bits/sstream.tcc: Same, for stringbuf, wstringbuf,
+ istringstream, wistringstream, ostringstream, wostringstream,
+ stringstream, wstringstream.
+ * include/bits/fstream.tcc: Same, for filebuf, wfilebuf, ifstream,
+ wifstream, ofstream, wofstream, fstream, wfstream.
+ * src/misc-inst.cc: Correct comments.
+ Add iomanip instantiations for wide streams.
+ * include/std/std_iomanip.h: Same.
+ * include/bits/locale_facets.tcc: Same.
+
+ * include/std/std_streambuf.h: Correct
+ _GLIBCPP_FULLY_COMPLIANT_HEADERS guard.
+ * include/std/std_sstream.h: Same.
+ * include/std/std_ostream.h: Same.
+ * include/std/std_istream.h: Same.
+ * include/std/std_fstream.h: Same.
+
+ * include/std/std_streambuf.h: Add definitions for private copy
+ ctor and assignment operator.
+ * include/std/std_istream.h: Remove declared but undefined copy
+ ctor and assignment operator. This is taken care of in ios_base,
+ so adding it in the derived class as well is superfluous.
+ * include/std/std_ostream.h: Same.
+
+ * include/bits/basic_ios.h (basic_ios::clear): Don't inline.
+ * include/bits/basic_ios.tcc (basic_ios::clear): Move definition here.
+
2002-02-14 Benjamin Kosnik <bkoz@redhat.com>
* config/linker-map.gnu: Change tag from GCC_3.1 to GLIBCPP_3.1.
diff --git a/libstdc++-v3/include/bits/basic_ios.h b/libstdc++-v3/include/bits/basic_ios.h
index f680a50..f917195 100644
--- a/libstdc++-v3/include/bits/basic_ios.h
+++ b/libstdc++-v3/include/bits/basic_ios.h
@@ -78,57 +78,49 @@ namespace std
const __numget_type* _M_fnumget;
public:
- inline const __ctype_type*
+ const __ctype_type*
_M_get_fctype_ios(void)
{ return _M_ios_fctype; }
operator void*() const
{ return this->fail() ? 0 : const_cast<basic_ios*>(this); }
- inline bool
+ bool
operator!() const
{ return this->fail(); }
- inline iostate
+ iostate
rdstate() const
{ return _M_streambuf_state; }
- inline void
- clear(iostate __state = goodbit)
- {
- if (this->rdbuf())
- _M_streambuf_state = __state;
- else
- _M_streambuf_state = __state | badbit;
- if ((this->rdstate() & this->exceptions()))
- __throw_ios_failure("basic_ios::clear(iostate) caused exception");
- }
+ void
+ clear(iostate __state = goodbit);
- inline void
+ void
setstate(iostate __state)
{ this->clear(this->rdstate() | __state); }
- inline bool
+ bool
good() const
{ return this->rdstate() == 0; }
- inline bool
+ bool
eof() const
{ return (this->rdstate() & eofbit) != 0; }
- inline bool
+ bool
fail() const
{ return (this->rdstate() & (badbit | failbit)) != 0; }
- inline bool
+ bool
bad() const
{ return (this->rdstate() & badbit) != 0; }
- inline iostate
+ iostate
exceptions() const
{ return _M_exception; }
- inline void
+ void
exceptions(iostate __except)
{
_M_exception = __except;
@@ -144,11 +136,11 @@ namespace std
~basic_ios() { }
// Members:
- inline basic_ostream<_CharT, _Traits>*
+ basic_ostream<_CharT, _Traits>*
tie() const
{ return _M_tie; }
- inline basic_ostream<_CharT, _Traits>*
+ basic_ostream<_CharT, _Traits>*
tie(basic_ostream<_CharT, _Traits>* __tiestr)
{
basic_ostream<_CharT, _Traits>* __old = _M_tie;
@@ -156,7 +148,7 @@ namespace std
return __old;
}
- inline basic_streambuf<_CharT, _Traits>*
+ basic_streambuf<_CharT, _Traits>*
rdbuf() const
{ return _M_streambuf; }
@@ -166,11 +158,11 @@ namespace std
basic_ios&
copyfmt(const basic_ios& __rhs);
- inline char_type
+ char_type
fill() const
{ return _M_fill; }
- inline char_type
+ char_type
fill(char_type __ch)
{
char_type __old = this->fill();
@@ -215,5 +207,3 @@ namespace std
#endif
#endif /* _CPP_BITS_BASICIOS_H */
-
-
diff --git a/libstdc++-v3/include/bits/basic_ios.tcc b/libstdc++-v3/include/bits/basic_ios.tcc
index dd4329f..63b797c 100644
--- a/libstdc++-v3/include/bits/basic_ios.tcc
+++ b/libstdc++-v3/include/bits/basic_ios.tcc
@@ -33,6 +33,18 @@
namespace std
{
template<typename _CharT, typename _Traits>
+ void
+ basic_ios<_CharT, _Traits>::clear(iostate __state)
+ {
+ if (this->rdbuf())
+ _M_streambuf_state = __state;
+ else
+ _M_streambuf_state = __state | badbit;
+ if ((this->rdstate() & this->exceptions()))
+ __throw_ios_failure("basic_ios::clear(iostate) caused exception");
+ }
+
+ template<typename _CharT, typename _Traits>
basic_streambuf<_CharT, _Traits>*
basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb)
{
@@ -165,6 +177,12 @@ namespace std
else
_M_fnumget = 0;
}
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+ extern template class basic_ios<char>;
+ extern template class basic_ios<wchar_t>;
} // namespace std
#endif
diff --git a/libstdc++-v3/include/bits/basic_string.tcc b/libstdc++-v3/include/bits/basic_string.tcc
index 896cd02..dd5038f 100644
--- a/libstdc++-v3/include/bits/basic_string.tcc
+++ b/libstdc++-v3/include/bits/basic_string.tcc
@@ -938,6 +938,37 @@ namespace std
_Traits::copy(__buf, __str.data(), __bytes);
__buf[__bytes] = _CharT();
}
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+ extern template class basic_string<char>;
+ extern template
+ basic_istream<char>&
+ operator>>(basic_istream<char>&, string&);
+ extern template
+ basic_ostream<char>&
+ operator<<(basic_ostream<char>&, const string&);
+ extern template
+ basic_istream<char>&
+ getline(basic_istream<char>&, string&, char);
+ extern template
+ basic_istream<char>&
+ getline(basic_istream<char>&, string&);
+
+ extern template class basic_string<wchar_t>;
+ extern template
+ basic_istream<wchar_t>&
+ operator>>(basic_istream<wchar_t>&, wstring&);
+ extern template
+ basic_ostream<wchar_t>&
+ operator<<(basic_ostream<wchar_t>&, const wstring&);
+ extern template
+ basic_istream<wchar_t>&
+ getline(basic_istream<wchar_t>&, wstring&, wchar_t);
+ extern template
+ basic_istream<wchar_t>&
+ getline(basic_istream<wchar_t>&, wstring&);
} // namespace std
#endif
diff --git a/libstdc++-v3/include/bits/fstream.tcc b/libstdc++-v3/include/bits/fstream.tcc
index 72dadc4..e6132d2 100644
--- a/libstdc++-v3/include/bits/fstream.tcc
+++ b/libstdc++-v3/include/bits/fstream.tcc
@@ -647,6 +647,18 @@ namespace std
// XXX The part in the above comment is not done.
_M_last_overflowed = false;
}
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+ extern template class basic_filebuf<char>;
+ extern template class basic_filebuf<wchar_t>;
+ extern template class basic_ifstream<char>;
+ extern template class basic_ifstream<wchar_t>;
+ extern template class basic_ofstream<char>;
+ extern template class basic_ofstream<wchar_t>;
+ extern template class basic_fstream<char>;
+ extern template class basic_fstream<wchar_t>;
} // namespace std
#endif
diff --git a/libstdc++-v3/include/bits/istream.tcc b/libstdc++-v3/include/bits/istream.tcc
index 4bc8da1..566db2e 100644
--- a/libstdc++-v3/include/bits/istream.tcc
+++ b/libstdc++-v3/include/bits/istream.tcc
@@ -1,4 +1,7 @@
-// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+// istream classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -1267,8 +1270,21 @@ namespace std
getline(basic_istream<_CharT, _Traits>& __in,
basic_string<_CharT,_Traits,_Alloc>& __str)
{ return getline(__in, __str, __in.widen('\n')); }
-} // namespace std
-// Local Variables:
-// mode:C++
-// End:
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+ extern template class basic_istream<char>;
+ extern template istream& ws(istream&);
+ extern template istream& operator>>(istream&, char&);
+ extern template istream& operator>>(istream&, char*);
+ extern template istream& operator>>(istream&, unsigned char&);
+ extern template istream& operator>>(istream&, signed char&);
+ extern template istream& operator>>(istream&, unsigned char*);
+ extern template istream& operator>>(istream&, signed char*);
+
+ extern template class basic_istream<wchar_t>;
+ extern template wistream& ws(wistream&);
+ extern template wistream& operator>>(wistream&, wchar_t&);
+ extern template wistream& operator>>(wistream&, wchar_t*);
+} // namespace std
diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc
index 38ee925..efea572 100644
--- a/libstdc++-v3/include/bits/locale_facets.tcc
+++ b/libstdc++-v3/include/bits/locale_facets.tcc
@@ -2038,6 +2038,59 @@ namespace std
while (__first != __last);
return __s;
}
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+ extern template class moneypunct<char, false>;
+ extern template class moneypunct<char, true>;
+ extern template class moneypunct_byname<char, false>;
+ extern template class moneypunct_byname<char, true>;
+ extern template class money_get<char, istreambuf_iterator<char> >;
+ extern template class money_put<char, ostreambuf_iterator<char> >;
+ extern template class moneypunct<wchar_t, false>;
+ extern template class moneypunct<wchar_t, true>;
+ extern template class moneypunct_byname<wchar_t, false>;
+ extern template class moneypunct_byname<wchar_t, true>;
+ extern template class money_get<wchar_t, istreambuf_iterator<wchar_t> >;
+ extern template class money_put<wchar_t, ostreambuf_iterator<wchar_t> >;
+ extern template class numpunct<char>;
+ extern template class numpunct_byname<char>;
+ extern template class num_get<char, istreambuf_iterator<char> >;
+ extern template class num_put<char, ostreambuf_iterator<char> >;
+ extern template class numpunct<wchar_t>;
+ extern template class numpunct_byname<wchar_t>;
+ extern template class num_get<wchar_t, istreambuf_iterator<wchar_t> >;
+ extern template class num_put<wchar_t, ostreambuf_iterator<wchar_t> >;
+ extern template class __timepunct<char>;
+ extern template class time_put<char, ostreambuf_iterator<char> >;
+ extern template class time_put_byname<char, ostreambuf_iterator<char> >;
+ extern template class time_get<char, istreambuf_iterator<char> >;
+ extern template class time_get_byname<char, istreambuf_iterator<char> >;
+ extern template class __timepunct<wchar_t>;
+ extern template class time_put<wchar_t, ostreambuf_iterator<wchar_t> >;
+ extern template class time_put_byname<wchar_t, ostreambuf_iterator<wchar_t> >;
+ extern template class time_get<wchar_t, istreambuf_iterator<wchar_t> >;
+ extern template class time_get_byname<wchar_t, istreambuf_iterator<wchar_t> >;
+ extern template class messages<char>;
+ extern template class messages_byname<char>;
+ extern template class messages<wchar_t>;
+ extern template class messages_byname<wchar_t>;
+ extern template class ctype_byname<char>;
+ extern template class ctype_byname<wchar_t>;
+ extern template class codecvt_byname<char, char, mbstate_t>;
+ extern template class codecvt_byname<wchar_t, char, mbstate_t>;
+ extern template class collate<char>;
+ extern template class collate_byname<char>;
+ extern template class collate<wchar_t>;
+ extern template class collate_byname<wchar_t>;
} // namespace std
#endif
+
+
+
+
+
+
+
diff --git a/libstdc++-v3/include/bits/ostream.tcc b/libstdc++-v3/include/bits/ostream.tcc
index a08695b..3182ff3 100644
--- a/libstdc++-v3/include/bits/ostream.tcc
+++ b/libstdc++-v3/include/bits/ostream.tcc
@@ -1,4 +1,7 @@
-// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+// ostream classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -679,8 +682,27 @@ namespace std
}
return __out;
}
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+ extern template class basic_ostream<char>;
+ extern template ostream& endl(ostream&);
+ extern template ostream& ends(ostream&);
+ extern template ostream& flush(ostream&);
+ extern template ostream& operator<<(ostream&, char);
+ extern template ostream& operator<<(ostream&, unsigned char);
+ extern template ostream& operator<<(ostream&, signed char);
+ extern template ostream& operator<<(ostream&, const char*);
+ extern template ostream& operator<<(ostream&, const unsigned char*);
+ extern template ostream& operator<<(ostream&, const signed char*);
+
+ extern template class basic_ostream<wchar_t>;
+ extern template wostream& endl(wostream&);
+ extern template wostream& ends(wostream&);
+ extern template wostream& flush(wostream&);
+ extern template wostream& operator<<(wostream&, wchar_t);
+ extern template wostream& operator<<(wostream&, char);
+ extern template wostream& operator<<(wostream&, const wchar_t*);
+ extern template wostream& operator<<(wostream&, const char*);
} // namespace std
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/libstdc++-v3/include/bits/sstream.tcc b/libstdc++-v3/include/bits/sstream.tcc
index d610532..884c190 100644
--- a/libstdc++-v3/include/bits/sstream.tcc
+++ b/libstdc++-v3/include/bits/sstream.tcc
@@ -206,6 +206,18 @@ namespace std
return __ret;
}
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+ extern template class basic_stringbuf<char>;
+ extern template class basic_stringbuf<wchar_t>;
+ extern template class basic_istringstream<char>;
+ extern template class basic_istringstream<wchar_t>;
+ extern template class basic_ostringstream<char>;
+ extern template class basic_ostringstream<wchar_t>;
+ extern template class basic_stringstream<char>;
+ extern template class basic_stringstream<wchar_t>;
} // namespace std
#endif
diff --git a/libstdc++-v3/include/bits/streambuf.tcc b/libstdc++-v3/include/bits/streambuf.tcc
index 81b4071..c4cec0f 100644
--- a/libstdc++-v3/include/bits/streambuf.tcc
+++ b/libstdc++-v3/include/bits/streambuf.tcc
@@ -224,6 +224,21 @@ namespace std
}
return __ret;
}
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+ extern template class basic_streambuf<char>;
+ extern template
+ streamsize
+ __copy_streambufs(basic_ios<char>&, basic_streambuf<char>*,
+ basic_streambuf<char>*);
+
+ extern template class basic_streambuf<wchar_t>;
+ extern template
+ streamsize
+ __copy_streambufs(basic_ios<wchar_t>&, basic_streambuf<wchar_t>*,
+ basic_streambuf<wchar_t>*);
} // namespace std
#endif
diff --git a/libstdc++-v3/include/std/std_fstream.h b/libstdc++-v3/include/std/std_fstream.h
index 9283975..c3273b5 100644
--- a/libstdc++-v3/include/std/std_fstream.h
+++ b/libstdc++-v3/include/std/std_fstream.h
@@ -505,9 +505,9 @@ namespace std
#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
# define export
+#endif
#ifdef _GLIBCPP_FULLY_COMPLIANT_HEADERS
# include <bits/fstream.tcc>
#endif
-#endif
#endif
diff --git a/libstdc++-v3/include/std/std_iomanip.h b/libstdc++-v3/include/std/std_iomanip.h
index 39ecac2..d2e3d31 100644
--- a/libstdc++-v3/include/std/std_iomanip.h
+++ b/libstdc++-v3/include/std/std_iomanip.h
@@ -47,7 +47,6 @@
namespace std
{
-
struct _Resetiosflags { ios_base::fmtflags _M_mask; };
inline _Resetiosflags
@@ -216,6 +215,35 @@ namespace std
__os.width(__f._M_n);
return __os;
}
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+ extern template ostream& operator<<(ostream&, _Setfill<char>);
+ extern template ostream& operator<<(ostream&, _Setiosflags);
+ extern template ostream& operator<<(ostream&, _Resetiosflags);
+ extern template ostream& operator<<(ostream&, _Setbase);
+ extern template ostream& operator<<(ostream&, _Setprecision);
+ extern template ostream& operator<<(ostream&, _Setw);
+ extern template wostream& operator<<(wostream&, _Setfill<wchar_t>);
+ extern template wostream& operator<<(wostream&, _Setiosflags);
+ extern template wostream& operator<<(wostream&, _Resetiosflags);
+ extern template wostream& operator<<(wostream&, _Setbase);
+ extern template wostream& operator<<(wostream&, _Setprecision);
+ extern template wostream& operator<<(wostream&, _Setw);
+
+ extern template istream& operator>>(istream&, _Setfill<char>);
+ extern template istream& operator>>(istream&, _Setiosflags);
+ extern template istream& operator>>(istream&, _Resetiosflags);
+ extern template istream& operator>>(istream&, _Setbase);
+ extern template istream& operator>>(istream&, _Setprecision);
+ extern template istream& operator>>(istream&, _Setw);
+ extern template wistream& operator>>(wistream&, _Setfill<wchar_t>);
+ extern template wistream& operator>>(wistream&, _Setiosflags);
+ extern template wistream& operator>>(wistream&, _Resetiosflags);
+ extern template wistream& operator>>(wistream&, _Setbase);
+ extern template wistream& operator>>(wistream&, _Setprecision);
+ extern template wistream& operator>>(wistream&, _Setw);
} // namespace std
#endif
diff --git a/libstdc++-v3/include/std/std_istream.h b/libstdc++-v3/include/std/std_istream.h
index d2228fa..40f4b67 100644
--- a/libstdc++-v3/include/std/std_istream.h
+++ b/libstdc++-v3/include/std/std_istream.h
@@ -204,15 +204,6 @@ namespace std
__istream_type&
seekg(off_type, ios_base::seekdir);
-
- private:
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
- // Not defined. (Side effect of DR 50.)
- __istream_type&
- operator=(const __istream_type&);
-
- basic_istream(const __istream_type&);
-#endif
};
template<typename _CharT, typename _Traits>
@@ -266,7 +257,7 @@ namespace std
// 27.6.1.5 Template class basic_iostream
template<typename _CharT, typename _Traits>
class basic_iostream
- : public basic_istream<_CharT, _Traits>,
+ : public basic_istream<_CharT, _Traits>,
public basic_ostream<_CharT, _Traits>
{
public:
@@ -291,9 +282,9 @@ namespace std
#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
# define export
+#endif
#ifdef _GLIBCPP_FULLY_COMPLIANT_HEADERS
# include <bits/istream.tcc>
#endif
-#endif
#endif /* _CPP_ISTREAM */
diff --git a/libstdc++-v3/include/std/std_ostream.h b/libstdc++-v3/include/std/std_ostream.h
index 676080c..eff4bb5 100644
--- a/libstdc++-v3/include/std/std_ostream.h
+++ b/libstdc++-v3/include/std/std_ostream.h
@@ -172,15 +172,6 @@ namespace std
__ostream_type&
seekp(off_type, ios_base::seekdir);
-
- private:
-#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
- // Not defined. (Side effect of DR 50.)
- __ostream_type&
- operator=(const __ostream_type&);
-
- basic_ostream(const __ostream_type&);
-#endif
};
// 27.6.2.3 Class basic_ostream::sentry
@@ -279,10 +270,9 @@ namespace std
#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
# define export
+#endif
#ifdef _GLIBCPP_FULLY_COMPLIANT_HEADERS
# include <bits/ostream.tcc>
#endif
-#endif
#endif /* _CPP_OSTREAM */
-
diff --git a/libstdc++-v3/include/std/std_sstream.h b/libstdc++-v3/include/std/std_sstream.h
index fc7eb05..bbd6dc6 100644
--- a/libstdc++-v3/include/std/std_sstream.h
+++ b/libstdc++-v3/include/std/std_sstream.h
@@ -362,9 +362,9 @@ namespace std
#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
# define export
+#endif
#ifdef _GLIBCPP_FULLY_COMPLIANT_HEADERS
# include <bits/sstream.tcc>
#endif
-#endif
#endif
diff --git a/libstdc++-v3/include/std/std_streambuf.h b/libstdc++-v3/include/std/std_streambuf.h
index 48ffd97..f57d96f 100644
--- a/libstdc++-v3/include/std/std_streambuf.h
+++ b/libstdc++-v3/include/std/std_streambuf.h
@@ -518,21 +518,21 @@ namespace std
#endif
#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
- // Side effect of DR 50.
+ // Side effect of DR 50.
private:
- basic_streambuf(const __streambuf_type&);
+ basic_streambuf(const __streambuf_type&) { };
__streambuf_type&
- operator=(const __streambuf_type&);
+ operator=(const __streambuf_type&) { };
#endif
};
} // namespace std
#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
# define export
+#endif
#ifdef _GLIBCPP_FULLY_COMPLIANT_HEADERS
#include <bits/streambuf.tcc>
#endif
-#endif
#endif
diff --git a/libstdc++-v3/src/locale-inst.cc b/libstdc++-v3/src/locale-inst.cc
index 598c3c3..324b07e 100644
--- a/libstdc++-v3/src/locale-inst.cc
+++ b/libstdc++-v3/src/locale-inst.cc
@@ -43,10 +43,10 @@
namespace std
{
- typedef ostreambuf_iterator<char, char_traits<char> > obuf_iterator;
- typedef istreambuf_iterator<char, char_traits<char> > ibuf_iterator;
- typedef ostreambuf_iterator<wchar_t, char_traits<wchar_t> > wobuf_iterator;
- typedef istreambuf_iterator<wchar_t, char_traits<wchar_t> > wibuf_iterator;
+ typedef ostreambuf_iterator<char> obuf_iterator;
+ typedef istreambuf_iterator<char> ibuf_iterator;
+ typedef ostreambuf_iterator<wchar_t> wobuf_iterator;
+ typedef istreambuf_iterator<wchar_t> wibuf_iterator;
// moneypunct, money_get, and money_put
template class moneypunct<char, false>;
@@ -174,16 +174,16 @@ namespace std
#endif
// ctype
- template class __ctype_abstract_base<char>;
+ inline template class __ctype_abstract_base<char>;
template class ctype_byname<char>;
#ifdef _GLIBCPP_USE_WCHAR_T
- template class __ctype_abstract_base<wchar_t>;
+ inline template class __ctype_abstract_base<wchar_t>;
template class ctype_byname<wchar_t>;
#endif
// codecvt
- template class __codecvt_abstract_base<char, char, mbstate_t>;
- template class __codecvt_abstract_base<wchar_t, char, mbstate_t>;
+ inline template class __codecvt_abstract_base<char, char, mbstate_t>;
+ inline template class __codecvt_abstract_base<wchar_t, char, mbstate_t>;
template class codecvt_byname<char, char, mbstate_t>;
#ifdef _GLIBCPP_USE_WCHAR_T
template class codecvt_byname<wchar_t, char, mbstate_t>;
diff --git a/libstdc++-v3/src/misc-inst.cc b/libstdc++-v3/src/misc-inst.cc
index bb0bd78..a276a73 100644
--- a/libstdc++-v3/src/misc-inst.cc
+++ b/libstdc++-v3/src/misc-inst.cc
@@ -1,6 +1,7 @@
// Explicit instantiation file.
-// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -44,7 +45,7 @@
#include <ostream>
#include <iomanip>
-// NB: unnecessary if the .h headers include these
+// NB: Unnecessary if the .h headers already include these.
#ifndef _GLIBCPP_FULLY_COMPLIANT_HEADERS
#include <bits/sstream.tcc>
#include <bits/fstream.tcc>
@@ -55,46 +56,31 @@
namespace std
{
-
- //
// streambuf
- //
template class basic_streambuf<char>;
#ifdef _GLIBCPP_USE_WCHAR_T
template class basic_streambuf<wchar_t>;
#endif
-
- //
- // stringstream
- //
+ // stringbuf
template class basic_stringbuf<char>;
#ifdef _GLIBCPP_USE_WCHAR_T
template class basic_stringbuf<wchar_t>;
#endif
-
- //
- // fstream
- //
+ // filebuf
template class basic_filebuf<char, char_traits<char> >;
#ifdef _GLIBCPP_USE_WCHAR_T
template class basic_filebuf<wchar_t, char_traits<wchar_t> >;
#endif
-
- //
// basic_ios
- //
template class basic_ios<char>;
#ifdef _GLIBCPP_USE_WCHAR_T
template class basic_ios<wchar_t>;
#endif
-
- //
// iomanip
- //
template class _Setfill<char>;
template _Setfill<char> setfill(char);
#ifdef _GLIBCPP_USE_WCHAR_T
@@ -102,10 +88,7 @@ namespace std
template _Setfill<wchar_t> setfill(wchar_t);
#endif
-
- //
// istream
- //
template class basic_istream<char>;
template istream& ws(istream&);
template istream& operator>>(istream&, char&);
@@ -115,10 +98,10 @@ namespace std
template istream& operator>>(istream&, unsigned char*);
template istream& operator>>(istream&, signed char*);
+ template istream& operator>>(istream&, _Setfill<char>);
template istream& operator>>(istream&, _Setiosflags);
template istream& operator>>(istream&, _Resetiosflags);
template istream& operator>>(istream&, _Setbase);
- template istream& operator>>(istream&, _Setfill<char>);
template istream& operator>>(istream&, _Setprecision);
template istream& operator>>(istream&, _Setw);
@@ -127,13 +110,16 @@ namespace std
template wistream& ws(wistream&);
template wistream& operator>>(wistream&, wchar_t&);
template wistream& operator>>(wistream&, wchar_t*);
+
template wistream& operator>>(wistream&, _Setfill<wchar_t>);
+ template wistream& operator>>(wistream&, _Setiosflags);
+ template wistream& operator>>(wistream&, _Resetiosflags);
+ template wistream& operator>>(wistream&, _Setbase);
+ template wistream& operator>>(wistream&, _Setprecision);
+ template wistream& operator>>(wistream&, _Setw);
#endif
-
- //
// ostream
- //
template class basic_ostream<char>;
template ostream& endl(ostream&);
template ostream& ends(ostream&);
@@ -145,10 +131,10 @@ namespace std
template ostream& operator<<(ostream&, const unsigned char*);
template ostream& operator<<(ostream&, const signed char*);
+ template ostream& operator<<(ostream&, _Setfill<char>);
template ostream& operator<<(ostream&, _Setiosflags);
template ostream& operator<<(ostream&, _Resetiosflags);
template ostream& operator<<(ostream&, _Setbase);
- template ostream& operator<<(ostream&, _Setfill<char>);
template ostream& operator<<(ostream&, _Setprecision);
template ostream& operator<<(ostream&, _Setw);
@@ -161,58 +147,59 @@ namespace std
template wostream& operator<<(wostream&, char);
template wostream& operator<<(wostream&, const wchar_t*);
template wostream& operator<<(wostream&, const char*);
+
template wostream& operator<<(wostream&, _Setfill<wchar_t>);
+ template wostream& operator<<(wostream&, _Setiosflags);
+ template wostream& operator<<(wostream&, _Resetiosflags);
+ template wostream& operator<<(wostream&, _Setbase);
+ template wostream& operator<<(wostream&, _Setprecision);
+ template wostream& operator<<(wostream&, _Setw);
#endif
- //
// iostream
- //
template class basic_iostream<char>;
#ifdef _GLIBCPP_USE_WCHAR_T
template class basic_iostream<wchar_t>;
#endif
-
- //
// ifstream
- //
template class basic_ifstream<char>;
#ifdef _GLIBCPP_USE_WCHAR_T
template class basic_ifstream<wchar_t>;
#endif
-
- //
// ofstream
- //
template class basic_ofstream<char>;
#ifdef _GLIBCPP_USE_WCHAR_T
template class basic_ofstream<wchar_t>;
#endif
+ // fstream
+ template class basic_fstream<char>;
+#ifdef _GLIBCPP_USE_WCHAR_T
+ template class basic_fstream<wchar_t>;
+#endif
- //
// istringstream
- //
template class basic_istringstream<char>;
#ifdef _GLIBCPP_USE_WCHAR_T
template class basic_istringstream<wchar_t>;
#endif
-
- //
// ostringstream
- //
template class basic_ostringstream<char>;
#ifdef _GLIBCPP_USE_WCHAR_T
template class basic_ostringstream<wchar_t>;
#endif
+ // stringstream
+ template class basic_stringstream<char>;
+#ifdef _GLIBCPP_USE_WCHAR_T
+ template class basic_stringstream<wchar_t>;
+#endif
- //
// string related to iostreams
- //
template
basic_istream<char>&
operator>>(basic_istream<char>&, string&);
@@ -240,9 +227,7 @@ namespace std
getline(basic_istream<wchar_t>&, wstring&);
#endif
- //
// algorithm
- //
typedef _Char_traits_match<char, char_traits<char> > char_match;
template
diff --git a/libstdc++-v3/src/string-inst.cc b/libstdc++-v3/src/string-inst.cc
index 4da060f..7ebc0c5 100644
--- a/libstdc++-v3/src/string-inst.cc
+++ b/libstdc++-v3/src/string-inst.cc
@@ -1,6 +1,7 @@
// Components for manipulating sequences of characters -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -45,9 +46,6 @@ namespace std
typedef basic_string<C> S;
template class basic_string<C>;
- template const C S::_Rep::_S_terminal;
- template S::size_type S::_Rep::_S_max_size;
-
template S operator+(const C*, const S&);
template S operator+(C, const S&);
template bool operator==(const S::iterator&, const S::iterator&);