summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-15 14:43:50 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2006-10-15 14:43:50 +0000
commit7e9db36e7541c9477fa98d1da2d3d0d4e190dd7c (patch)
tree5e28fb2604e13e239e002eacfc4111aaef4fd806 /libstdc++-v3/include
parent312f4798417eb159e2fe53676aba468a33a39265 (diff)
downloadgcc-7e9db36e7541c9477fa98d1da2d3d0d4e190dd7c.tar.gz
2006-10-15 Paolo Carlini <pcarlini@suse.de>
* include/bits/istream.tcc (getline(basic_istream<>&, basic_string<>&)): Move... * include/bits/basic_string.h: ... here. (operator<<(basic_ostream<>&, const basic_string<>&)): Mark inline. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117745 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r--libstdc++-v3/include/bits/basic_string.h7
-rw-r--r--libstdc++-v3/include/bits/istream.tcc6
2 files changed, 4 insertions, 9 deletions
diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h
index da6ef1c2d19..9e8ea6c6e0c 100644
--- a/libstdc++-v3/include/bits/basic_string.h
+++ b/libstdc++-v3/include/bits/basic_string.h
@@ -2394,7 +2394,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* writing a C string.
*/
template<typename _CharT, typename _Traits, typename _Alloc>
- basic_ostream<_CharT, _Traits>&
+ inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os,
const basic_string<_CharT, _Traits, _Alloc>& __str)
{
@@ -2436,8 +2436,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
template<typename _CharT, typename _Traits, typename _Alloc>
inline basic_istream<_CharT, _Traits>&
getline(basic_istream<_CharT, _Traits>& __is,
- basic_string<_CharT, _Traits, _Alloc>& __str);
-
+ basic_string<_CharT, _Traits, _Alloc>& __str)
+ { return getline(__is, __str, __is.widen('\n')); }
+
template<>
basic_istream<char>&
getline(basic_istream<char>& __in, basic_string<char>& __str,
diff --git a/libstdc++-v3/include/bits/istream.tcc b/libstdc++-v3/include/bits/istream.tcc
index 39ee2c75772..38caddc4de2 100644
--- a/libstdc++-v3/include/bits/istream.tcc
+++ b/libstdc++-v3/include/bits/istream.tcc
@@ -988,12 +988,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return __in;
}
- template<class _CharT, class _Traits, class _Alloc>
- inline basic_istream<_CharT,_Traits>&
- getline(basic_istream<_CharT, _Traits>& __in,
- basic_string<_CharT,_Traits,_Alloc>& __str)
- { return getline(__in, __str, __in.widen('\n')); }
-
// Inhibit implicit instantiations for required instantiations,
// which are defined via explicit instantiations elsewhere.
// NB: This syntax is a GNU extension.