2 * Copyright (c) 1997-1999
3 * Silicon Graphics Computer Systems, Inc.
8 * This material is provided "as is", with absolutely no warranty expressed
9 * or implied. Any use is at your own risk.
11 * Permission to use or copy this software for any purpose is hereby granted
12 * without fee, provided the above notices are retained on all copies.
13 * Permission to modify the code and to distribute modified code is granted,
14 * provided the above notices are retained, and a notice that the code was
15 * modified is included with the above copyright notice.
19 #ifndef _STLP_STRING_IO_H
20 #define _STLP_STRING_IO_H
22 #ifndef _STLP_INTERNAL_OSTREAM_H
23 # include <stl/_ostream.h>
26 #ifndef _STLP_INTERNAL_ISTREAM
27 # include <stl/_istream.h>
33 template <class _CharT, class _Traits, class _Alloc>
34 basic_ostream<_CharT, _Traits>& _STLP_CALL
35 operator<<(basic_ostream<_CharT, _Traits>& __os,
36 const basic_string<_CharT,_Traits,_Alloc>& __s);
38 #if defined (_STLP_USE_TEMPLATE_EXPRESSION)
40 template <class _CharT, class _Traits, class _Alloc, class _Left, class _Right, class _StorageDir>
41 basic_ostream<_CharT, _Traits>& _STLP_CALL
42 operator<<(basic_ostream<_CharT, _Traits>& __os,
43 const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __sum) {
44 basic_string<_CharT, _Traits, _Alloc> __tmp(__sum);
48 #endif /* _STLP_USE_TEMPLATE_EXPRESSION */
50 template <class _CharT, class _Traits, class _Alloc>
51 basic_istream<_CharT, _Traits>& _STLP_CALL
52 operator>>(basic_istream<_CharT, _Traits>& __is,
53 basic_string<_CharT,_Traits,_Alloc>& __s);
55 template <class _CharT, class _Traits, class _Alloc>
56 basic_istream<_CharT, _Traits>& _STLP_CALL
57 getline(basic_istream<_CharT, _Traits>& __is,
58 basic_string<_CharT,_Traits,_Alloc>& __s,
61 #if !(defined (__BORLANDC__) && !defined (_STLP_USE_OWN_NAMESPACE))
63 template <class _CharT, class _Traits, class _Alloc>
64 inline basic_istream<_CharT, _Traits>& _STLP_CALL
65 getline(basic_istream<_CharT, _Traits>& __is,
66 basic_string<_CharT,_Traits,_Alloc>& __s) {
67 return getline(__is, __s, __is.widen('\n'));
73 #if !defined (_STLP_LINK_TIME_INSTANTIATION)
74 # include <stl/_string_io.c>
77 #endif /* _STLP_STRING_IO_H */