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
This commit is contained in:
parent
78b14aa62c
commit
c7e2dba59a
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
|
||||
// 22.2.1.5 Template class codecvt
|
||||
|
||||
// { dg-do compile }
|
||||
|
||||
#include <locale>
|
||||
|
||||
void test01()
|
||||
|
|
Loading…
Reference in New Issue