diff options
author | Benjamin Kosnik <bkoz@redhat.com> | 2001-10-31 20:05:33 +0000 |
---|---|---|
committer | Benjamin Kosnik <bkoz@gcc.gnu.org> | 2001-10-31 20:05:33 +0000 |
commit | c7e2dba59a4b35a09c955a21194a6bcd996990a5 (patch) | |
tree | b2fd33128877b396f1f31a64a235059dd6fe7664 | |
parent | 78b14aa62cc8ad119ef9116300b1337d47d41774 (diff) | |
download | gcc-c7e2dba59a4b35a09c955a21194a6bcd996990a5.zip gcc-c7e2dba59a4b35a09c955a21194a6bcd996990a5.tar.gz gcc-c7e2dba59a4b35a09c955a21194a6bcd996990a5.tar.bz2 |
codecvt.h: Add virtual member function declarations.
2001-10-31 Benjamin Kosnik <bkoz@redhat.com>
libstdc++/4749
* include/bits/codecvt.h: Add virtual member function declarations.
* src/codecvt.cc: Tweaks.
* testsuite/22_locale/codecvt.cc: Test compilation only,
non-required facets not required to have linkage.
From-SVN: r46685
-rw-r--r-- | libstdc++-v3/ChangeLog | 8 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/codecvt.h | 33 | ||||
-rw-r--r-- | libstdc++-v3/src/codecvt.cc | 18 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/22_locale/codecvt.cc | 2 |
4 files changed, 47 insertions, 14 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index db31eee..bf6780e 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +2001-10-31 Benjamin Kosnik <bkoz@redhat.com> + + libstdc++/4749 + * include/bits/codecvt.h: Add virtual member function declarations. + * src/codecvt.cc: Tweaks. + * testsuite/22_locale/codecvt.cc: Test compilation only, + non-required facets not required to have linkage. + 2001-10-31 Edward E. Meyer <edward.e.meyer@boeing.com> libstdc++/4622 diff --git a/libstdc++-v3/include/bits/codecvt.h b/libstdc++-v3/include/bits/codecvt.h index 448cffa..441f40c 100644 --- a/libstdc++-v3/include/bits/codecvt.h +++ b/libstdc++-v3/include/bits/codecvt.h @@ -171,6 +171,35 @@ protected: virtual ~codecvt() { } + + virtual result + do_out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const; + + virtual result + do_unshift(state_type& __state, extern_type* __to, + extern_type* __to_end, extern_type*& __to_next) const; + + virtual result + do_in(state_type& __state, const extern_type* __from, + const extern_type* __from_end, const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const; + + virtual int + do_encoding() const throw(); + + virtual bool + do_always_noconv() const throw(); + + virtual int + do_length(const state_type&, const extern_type* __from, + const extern_type* __end, size_t __max) const; + + virtual int + do_max_length() const throw(); }; template<typename _InternT, typename _ExternT, typename _StateT> @@ -302,7 +331,3 @@ #endif #endif // _CPP_BITS_CODECVT_H - - - - diff --git a/libstdc++-v3/src/codecvt.cc b/libstdc++-v3/src/codecvt.cc index 3a798fc..5e7cdb6 100644 --- a/libstdc++-v3/src/codecvt.cc +++ b/libstdc++-v3/src/codecvt.cc @@ -46,7 +46,7 @@ namespace std codecvt_base::result codecvt<char, char, mbstate_t>:: - do_out(state_type& /*__state*/, const intern_type* __from, + do_out(state_type&, const intern_type* __from, const intern_type* __from_end, const intern_type*& __from_next, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const @@ -60,8 +60,8 @@ namespace std codecvt_base::result codecvt<char, char, mbstate_t>:: - do_unshift(state_type& /*__state*/, extern_type* __to, - extern_type* /*__to_end*/, extern_type*& __to_next) const + do_unshift(state_type&, extern_type* __to, + extern_type*, extern_type*& __to_next) const { __to_next = __to; return noconv; @@ -69,7 +69,7 @@ namespace std codecvt_base::result codecvt<char, char, mbstate_t>:: - do_in(state_type& /*__state*/, const extern_type* __from, + do_in(state_type&, const extern_type* __from, const extern_type* __from_end, const extern_type*& __from_next, intern_type* __to, intern_type* __to_end, intern_type*& __to_next) const @@ -93,7 +93,7 @@ namespace std int codecvt<char, char, mbstate_t>:: - do_length (const state_type& /*__state*/, const extern_type* __from, + do_length (const state_type&, const extern_type* __from, const extern_type* __end, size_t __max) const { return min(__max, static_cast<size_t>(__end - __from)); } @@ -142,8 +142,8 @@ namespace std codecvt_base::result codecvt<wchar_t, char, mbstate_t>:: - do_unshift(state_type& /*__state*/, extern_type* __to, - extern_type* /*__to_end*/, extern_type*& __to_next) const + do_unshift(state_type&, extern_type* __to, + extern_type*, extern_type*& __to_next) const { __to_next = __to; return noconv; @@ -190,7 +190,7 @@ namespace std int codecvt<wchar_t, char, mbstate_t>:: - do_length(const state_type& /*__state*/, const extern_type* __from, + do_length(const state_type&, const extern_type* __from, const extern_type* __end, size_t __max) const { return min(__max, static_cast<size_t>(__end - __from)); } @@ -200,5 +200,3 @@ namespace std { return 1; } #endif // _GLIBCPP_USE_WCHAR_T } // namespace std - - diff --git a/libstdc++-v3/testsuite/22_locale/codecvt.cc b/libstdc++-v3/testsuite/22_locale/codecvt.cc index 19dc271..a4670b7 100644 --- a/libstdc++-v3/testsuite/22_locale/codecvt.cc +++ b/libstdc++-v3/testsuite/22_locale/codecvt.cc @@ -20,6 +20,8 @@ // 22.2.1.5 Template class codecvt +// { dg-do compile } + #include <locale> void test01() |