Tune for size.
authorBenjamin Kosnik <bkoz@redhat.com>
Sat, 16 Feb 2002 00:19:13 +0000 (00:19 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Sat, 16 Feb 2002 00:19:13 +0000 (00:19 +0000)
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

19 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/basic_ios.h
libstdc++-v3/include/bits/basic_ios.tcc
libstdc++-v3/include/bits/basic_string.tcc
libstdc++-v3/include/bits/fstream.tcc
libstdc++-v3/include/bits/istream.tcc
libstdc++-v3/include/bits/locale_facets.tcc
libstdc++-v3/include/bits/ostream.tcc
libstdc++-v3/include/bits/sstream.tcc
libstdc++-v3/include/bits/streambuf.tcc
libstdc++-v3/include/std/std_fstream.h
libstdc++-v3/include/std/std_iomanip.h
libstdc++-v3/include/std/std_istream.h
libstdc++-v3/include/std/std_ostream.h
libstdc++-v3/include/std/std_sstream.h
libstdc++-v3/include/std/std_streambuf.h
libstdc++-v3/src/locale-inst.cc
libstdc++-v3/src/misc-inst.cc
libstdc++-v3/src/string-inst.cc

index f755984c05917a0f0ed694ee0756c927dd5b3be6..efc9bade1162bf783760ca5e1cb539cef9737b94 100644 (file)
@@ -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.
index f680a5082063ddfc19d8caff52520e9e7f19a0a1..f91719582f1dd441a45dbd52cee9528d4e9738db 100644 (file)
@@ -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 */
-
-
index dd4329f5cd9f067e94c96119906c68df4782c9fb..63b797c0b2ed189e91c09211685b540c06f27817 100644 (file)
 
 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 
index 896cd02afa72276e2fff49fe1e394fe7bf734a81..dd5038ffe0d1f631ca003a83423126309e6d1afe 100644 (file)
@@ -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
index 72dadc4000a78af449f42e19b4d1dc883ce1f41b..e6132d2b31aee8b1cef830cc05d752e95a987541 100644 (file)
@@ -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 
index 4bc8da1c899c79f1e027077aaa2197d9f990b126..566db2e15a1716a83b86ff6ba77d26357716bb3c 100644 (file)
@@ -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
index 38ee9251dc4d659aa2885d3bbf16c7eba08f87dc..efea5728c97bbc7dcd1628acb1ff9423d9a5a5aa 100644 (file)
@@ -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
+
+
+
+
+
+
+
index a08695bc6d1b3adabd11756b08fa04355f26cd3a..3182ff337693ff8c401c33231303c6ef2206856c 100644 (file)
@@ -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:
index d610532ae75bc0293f4e5b509e4c785f2240e3d0..884c190877f7c9bbd011fee432ca3ffa785ca08a 100644 (file)
@@ -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
index 81b40716f981e34f4274c15177b6ef2caa246e9a..c4cec0fd939112856469670ba7ccea27807909a8 100644 (file)
@@ -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 
index 92839753bd6f0ca7995776cc1ce15694961af60a..c3273b55fd493aba156d3793cfb6a3de4190df15 100644 (file)
@@ -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
index 39ecac2c77f738c0b18346755c19a655a05e4dfb..d2e3d3182d415916ea7e8d1aa0c3a36543f12203 100644 (file)
@@ -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 
index d2228fa6f267c7efdcf938cdaa4d381a657b68a7..40f4b67fb9f75dee50024b244add9088a2ac7ed2 100644 (file)
@@ -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 */
index 676080c1f20bdf40b6c86a0d43ee2c286be4d40f..eff4bb5119f3f9a705c98032abbe1b3f9766861a 100644 (file)
@@ -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 */
-
index fc7eb05654fe61b205677c9d32985af64622fecc..bbd6dc60b754e3fe900e6ffba0ce7c2c081ef566 100644 (file)
@@ -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
index 48ffd97e2f787d0f463321e5e872c1bc438d7417..f57d96fc17da75f84a6c294ad9e2a5f0c9c0c96e 100644 (file)
@@ -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 
index 598c3c3869de24005dcda12fdcef99fa4fe28549..324b07e93698917e82ae9ebbd608acb89a795d6f 100644 (file)
 
 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>;
index bb0bd78da93d41219ad6d11831fa01b853a1e4b4..a276a732ed3e08af37b25be91db57fcd873e0ea8 100644 (file)
@@ -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>
 
 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 
index 4da060fefb270e0f6c0350f242ca0b30e9d9e7a1..7ebc0c5abd3419167f6f05a848ab8017045cc17e 100644 (file)
@@ -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&);