]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
pod_char_traits.h: Add state template argument.
authorBenjamin Kosnik <bkoz@redhat.com>
Thu, 17 Jul 2003 04:01:28 +0000 (04:01 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Thu, 17 Jul 2003 04:01:28 +0000 (04:01 +0000)
2003-07-16  Benjamin Kosnik  <bkoz@redhat.com>

* include/ext/pod_char_traits.h: Add state template argument.

From-SVN: r69492

libstdc++-v3/ChangeLog
libstdc++-v3/include/ext/pod_char_traits.h

index 6510aa0f7b093947e95ab49dfb5918fc6fd32a9d..cf0e5e3a1959eb50cb97a7de4dc4a48ad50fd1a9 100644 (file)
@@ -1,3 +1,7 @@
+2003-07-16  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * include/ext/pod_char_traits.h: Add state template argument.
+
 2003-07-16  Benjamin Kosnik  <bkoz@redhat.com>
 
        * include/bits/locale_facets.h (__num_base::_S_atoms_in): Add -+xX.
index 0145a4830957cd6042fa620d24e7937101979c40..04bc0ddb52bb4cdd7682443e46b4b437edd801b3 100644 (file)
 
 namespace __gnu_cxx
 {
-  template<typename V, typename I>
+  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;
     };
   
@@ -59,19 +60,18 @@ namespace __gnu_cxx
 namespace std
 {
   // Provide std::char_traits specialization.
-  template<typename V, typename I>
-    struct char_traits<__gnu_cxx::character<V, I> >
+  template<typename V, typename I, typename S>
+    struct char_traits<__gnu_cxx::character<V, I, S> >
     {
-      typedef __gnu_cxx::character<V, I>       char_type;
+      typedef __gnu_cxx::character<V, I, S>    char_type;
 
       // NB: This type should be bigger than char_type, so as to
       // 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;
-      typedef mbstate_t                        state_type;
       
       static void 
       assign(char_type& __c1, const char_type& __c2)