From 49d5c016dae45d256509c0ea80c983e431dce5cd Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Mon, 2 Jan 2006 09:57:49 +0000 Subject: re PR libstdc++/24645 (Commonize arithmetic inserters/extractors bodies) 2006-01-02 Paolo Carlini 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 --- libstdc++-v3/src/istream-inst.cc | 28 ++++++++++++++++++++++++++++ libstdc++-v3/src/ostream-inst.cc | 24 +++++++++++++++++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) (limited to 'libstdc++-v3/src') 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; 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; 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 -- cgit v1.1