[v3] pod_char_traits tweak
Benjamin Kosnik
bkoz@redhat.com
Thu Jul 17 04:00:00 GMT 2003
Also needed so that pod_char_traits can do all the things the old,
separate testsuite classes do.
tested x86/linux
2003-07-16 Benjamin Kosnik <bkoz@redhat.com>
* include/ext/pod_char_traits.h: Add state template argument.
Index: include/ext/pod_char_traits.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/ext/pod_char_traits.h,v
retrieving revision 1.2
diff -c -p -r1.2 pod_char_traits.h
*** include/ext/pod_char_traits.h 10 Jul 2003 06:21:11 -0000 1.2
--- include/ext/pod_char_traits.h 17 Jul 2003 02:32:42 -0000
***************
*** 37,47 ****
namespace __gnu_cxx
{
! template<typename V, typename I>
struct character
{
typedef V value_type;
typedef I int_type;
value_type value;
};
--- 37,48 ----
namespace __gnu_cxx
{
! template<typename V, typename I, typename S = mbstate_t>
struct character
{
typedef V value_type;
typedef I int_type;
+ typedef S state_type;
value_type value;
};
*************** namespace __gnu_cxx
*** 59,66 ****
namespace std
{
// Provide std::char_traits specialization.
! template<typename V, typename I>
! struct char_traits<__gnu_cxx::character<V, I> >
{
typedef __gnu_cxx::character<V, I> char_type;
--- 60,67 ----
namespace std
{
// Provide std::char_traits specialization.
! template<typename V, typename I, typename S = mbstate_t>
! struct char_traits<__gnu_cxx::character<V, I, S> >
{
typedef __gnu_cxx::character<V, I> char_type;
*************** namespace std
*** 68,77 ****
// properly hold EOF values in addition to the full range of
// char_type values.
typedef typename char_type::int_type int_type;
!
typedef streampos pos_type;
typedef streamoff off_type;
- typedef mbstate_t state_type;
static void
assign(char_type& __c1, const char_type& __c2)
--- 69,77 ----
// properly hold EOF values in addition to the full range of
// char_type values.
typedef typename char_type::int_type int_type;
! typedef typename char_type::state_type state_type;
typedef streampos pos_type;
typedef streamoff off_type;
static void
assign(char_type& __c1, const char_type& __c2)
More information about the Gcc-patches
mailing list