aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/bits/locale_facets.h
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2002-07-31 02:47:36 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2002-07-31 02:47:36 +0000
commitf13a69eccf8e409e1046f6bc1df333f0bf69cb6f (patch)
tree08b6c08936b83169138f92c71df06d93579f7e79 /libstdc++-v3/include/bits/locale_facets.h
parent506a61b144b1bd438ed18f767d9831bc95d739ac (diff)
downloadgcc-f13a69eccf8e409e1046f6bc1df333f0bf69cb6f.zip
gcc-f13a69eccf8e409e1046f6bc1df333f0bf69cb6f.tar.gz
gcc-f13a69eccf8e409e1046f6bc1df333f0bf69cb6f.tar.bz2
char_traits.h: Remove generic definitions.
2002-07-30 Benjamin Kosnik <bkoz@redhat.com> Gabriel Dos Reis <gdr@nerim.net> * include/bits/char_traits.h: Remove generic definitions. * include/bits/streambuf_iterator.h (istreambuf_iterator): Use eof, not -2. * include/bits/istream.tcc (istream::readsome): Don't check against eof, instead use constants. (istream::sync): Same. (istream::sentry::sentry): Use eq_int_type. (istream::get): Same. * include/bits/ostream.tcc: Change __pad to __pad<_CharT, _Traits>::_S_pad. * include/bits/locale_facets.h: Add __pad_traits generic and ostreambuf_iterator specialization. * include/bits/locale_facets.tcc: Change __pad into struct __pad with a _CharT and _Traits template parameter and _S_pad static member function. * src/locale-inst.cc: Update __pad instantiations. * include/std/std_fstream.h: Declare _M_underflow_common specializations. * src/fstream.cc: New. Add _M_underflow_common specializations. * include/bits/fstream.tcc (filebuf::close): Use traits_type. (filebuf::_M_underflow_common(bool)): Remove generic version, as sys_ungetc and custom int_types don't get along. * include/std/std_streambuf.h: Add _M_pos. * src/Makefile.am (sources): Add fstream.cc. * src/Makefile.in: Regenerate. * testsuite/21_strings/capacity.cc: Add char_traits specializations. * testsuite/22_locale/codecvt_members_unicode_char.cc: Same. * testsuite/22_locale/codecvt_members_unicode_wchar_t.cc: Same. * testsuite/22_locale/ctor_copy_dtor.cc: Same. * testsuite/27_io/filebuf_virtuals.cc (test07): Move to... * testsuite/27_io/filebuf.cc: ...here. * testsuite/testsuite_hooks.h: Add gnu_char, gnu_int, char_traits specialization for both. * testsuite/27_io/streambuf.cc: Add instantiation test, testsuite_hooks include. * testsuite/27_io/istream.cc: Same. * testsuite/27_io/ostream.cc: Same. * testsuite/27_io/fstream.cc: Same. * testsuite/27_io/stringstream.cc: Same. * testsuite/27_io/filebuf.cc: Same. * testsuite/27_io/stringbuf.cc: Same. Co-Authored-By: Gabriel Dos Reis <gdr@nerim.net> From-SVN: r55893
Diffstat (limited to 'libstdc++-v3/include/bits/locale_facets.h')
-rw-r--r--libstdc++-v3/include/bits/locale_facets.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/libstdc++-v3/include/bits/locale_facets.h b/libstdc++-v3/include/bits/locale_facets.h
index 241c465..159cecc 100644
--- a/libstdc++-v3/include/bits/locale_facets.h
+++ b/libstdc++-v3/include/bits/locale_facets.h
@@ -55,6 +55,9 @@ namespace std
# define _GLIBCPP_NUM_FACETS 14
#endif
+ template<typename _CharT, typename _Traits>
+ struct __pad;
+
// 22.2.1.1 Template class ctype
// Include host and configuration specific ctype enums for ctype_base.
#include <bits/ctype_base.h>
@@ -652,6 +655,7 @@ namespace std
virtual iter_type
do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const;
+
virtual iter_type
do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, long&) const;
@@ -697,6 +701,23 @@ namespace std
template<typename _CharT, typename _InIter>
locale::id num_get<_CharT, _InIter>::id;
+#if 0
+ // Partial specialization for istreambuf_iterator, so can use traits_type.
+ template<typename _CharT>
+ class num_get<_CharT, istreambuf_iterator<_CharT> >;
+
+ iter_type
+ _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&,
+ string& __xtrc) const;
+
+ iter_type
+ _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&,
+ string& __xtrc, int& __base) const;
+
+ virtual iter_type
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const;
+#endif
+
template<typename _CharT, typename _OutIter>
class num_put : public locale::facet, public __num_base
{