diff options
author | Paolo Carlini <pcarlini@suse.de> | 2006-01-02 09:57:49 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2006-01-02 09:57:49 +0000 |
commit | 49d5c016dae45d256509c0ea80c983e431dce5cd (patch) | |
tree | f19f281bfa2b6d65105d46eb53236d70bfa0d498 /libstdc++-v3/src | |
parent | 5f0926cd781936cc3cb73f34fcd35418f6e43880 (diff) | |
download | gcc-49d5c016dae45d256509c0ea80c983e431dce5cd.zip gcc-49d5c016dae45d256509c0ea80c983e431dce5cd.tar.gz gcc-49d5c016dae45d256509c0ea80c983e431dce5cd.tar.bz2 |
re PR libstdc++/24645 (Commonize arithmetic inserters/extractors bodies)
2006-01-02 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/24645
* include/std/std_istream.h (basic_istream<>::_M_extract): New.
(operator>>(bool&), operator>>(short&), operator>>(unsigned short&),
operator>>(int&), operator>>(unsigned int&), operator>>(long&),
operator>>(unsigned long&), operator>>(long long&), operator>>
(unsigned long long&), operator>>(float&), operator>>(double&),
operator>>(long double&), operator>>(void*&)): Use it.
* include/bits/istream.tcc (basic_istream<>::_M_extract): Define.
* include/std/std_ostream.h (basic_ostream<>::_M_insert): New.
(operator<<(long), operator<<(unsigned long), operator<<(bool),
operator<<(short), operator<<(unsigned short), operator<<(int),
operator<<(unsigned int), operator<<(long long), operator<<
(unsigned long long), operator<<(double), operator<<(float),
operator<<(long double), operator<<(const void*): Use it.
* include/bits/ostream.tcc (basic_ostream<>::_M_insert): Define.
* src/istream-inst.cc: Add _M_insert instantiations.
* src/ostream-inst.cc: Add _M_extract instantiations.
* config/abi/pre/gnu.ver: Export the new symbols @GLIBCXX_3.4.7;
detail existing @GLIBCXX_3.4 exports of basic_ostream, num_put,
money_put, etc., symbols to avoid exporting _M_insert symbols
@GLIBCXX_3.4.
From-SVN: r109236
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r-- | libstdc++-v3/src/istream-inst.cc | 28 | ||||
-rw-r--r-- | libstdc++-v3/src/ostream-inst.cc | 24 |
2 files changed, 51 insertions, 1 deletions
diff --git a/libstdc++-v3/src/istream-inst.cc b/libstdc++-v3/src/istream-inst.cc index d71314d..2e5c7d3 100644 --- a/libstdc++-v3/src/istream-inst.cc +++ b/libstdc++-v3/src/istream-inst.cc @@ -53,6 +53,20 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template istream& operator>>(istream&, _Setprecision); template istream& operator>>(istream&, _Setw); + template istream& istream::_M_extract(unsigned short&); + template istream& istream::_M_extract(unsigned int&); + template istream& istream::_M_extract(long&); + template istream& istream::_M_extract(unsigned long&); + template istream& istream::_M_extract(bool&); +#ifdef _GLIBCXX_USE_LONG_LONG + template istream& istream::_M_extract(long long&); + template istream& istream::_M_extract(unsigned long long&); +#endif + template istream& istream::_M_extract(float&); + template istream& istream::_M_extract(double&); + template istream& istream::_M_extract(long double&); + template istream& istream::_M_extract(void*&); + #ifdef _GLIBCXX_USE_WCHAR_T template class basic_istream<wchar_t>; template wistream& ws(wistream&); @@ -65,6 +79,20 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template wistream& operator>>(wistream&, _Setbase); template wistream& operator>>(wistream&, _Setprecision); template wistream& operator>>(wistream&, _Setw); + + template wistream& wistream::_M_extract(unsigned short&); + template wistream& wistream::_M_extract(unsigned int&); + template wistream& wistream::_M_extract(long&); + template wistream& wistream::_M_extract(unsigned long&); + template wistream& wistream::_M_extract(bool&); +#ifdef _GLIBCXX_USE_LONG_LONG + template wistream& wistream::_M_extract(long long&); + template wistream& wistream::_M_extract(unsigned long long&); +#endif + template wistream& wistream::_M_extract(float&); + template wistream& wistream::_M_extract(double&); + template wistream& wistream::_M_extract(long double&); + template wistream& wistream::_M_extract(void*&); #endif _GLIBCXX_END_NAMESPACE diff --git a/libstdc++-v3/src/ostream-inst.cc b/libstdc++-v3/src/ostream-inst.cc index 4568dca..70df37b 100644 --- a/libstdc++-v3/src/ostream-inst.cc +++ b/libstdc++-v3/src/ostream-inst.cc @@ -1,6 +1,6 @@ // Explicit instantiation file. -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2005 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -56,6 +56,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template ostream& operator<<(ostream&, _Setprecision); template ostream& operator<<(ostream&, _Setw); + template ostream& ostream::_M_insert(long); + template ostream& ostream::_M_insert(unsigned long); + template ostream& ostream::_M_insert(bool); +#ifdef _GLIBCXX_USE_LONG_LONG + template ostream& ostream::_M_insert(long long); + template ostream& ostream::_M_insert(unsigned long long); +#endif + template ostream& ostream::_M_insert(double); + template ostream& ostream::_M_insert(long double); + template ostream& ostream::_M_insert(const void*); + #ifdef _GLIBCXX_USE_WCHAR_T template class basic_ostream<wchar_t>; template wostream& endl(wostream&); @@ -72,6 +83,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template wostream& operator<<(wostream&, _Setbase); template wostream& operator<<(wostream&, _Setprecision); template wostream& operator<<(wostream&, _Setw); + + template wostream& wostream::_M_insert(long); + template wostream& wostream::_M_insert(unsigned long); + template wostream& wostream::_M_insert(bool); +#ifdef _GLIBCXX_USE_LONG_LONG + template wostream& wostream::_M_insert(long long); + template wostream& wostream::_M_insert(unsigned long long); +#endif + template wostream& wostream::_M_insert(double); + template wostream& wostream::_M_insert(long double); + template wostream& wostream::_M_insert(const void*); #endif _GLIBCXX_END_NAMESPACE |