std_bitset.h (operator>>): Change to char_type.
authorYuri V. Baskakov <yuribsk@lab.sun.mcst.ru>
Mon, 18 Sep 2000 18:08:46 +0000 (18:08 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Mon, 18 Sep 2000 18:08:46 +0000 (18:08 +0000)
2000-09-18  Yuri V. Baskakov  <yuribsk@lab.sun.mcst.ru>

* bits/std_bitset.h (operator>>): Change to char_type.

From-SVN: r36505

libstdc++-v3/ChangeLog
libstdc++-v3/bits/std_bitset.h

index 4de4ac33f46b36cae3ff88c8f7015bcfc1acd1cc..3c0e5015b135037593584d0625a784076e3065a9 100644 (file)
@@ -1,3 +1,7 @@
+2000-09-18  Yuri V. Baskakov  <yuribsk@lab.sun.mcst.ru>
+
+       * bits/std_bitset.h (operator>>): Change to char_type.
+
 2000-09-15  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>
 
        * src/locale.cc (locale::locale(const char* __name)): Consolidate
index 6556ee39806b325e98e7817579a52eeea5e48ada..52f567854cb30efa7dc2ef676df7ee0d01eafcb2 100644 (file)
@@ -848,6 +848,7 @@ template <class _CharT, class _Traits, size_t _Nb>
 basic_istream<_CharT, _Traits>&
 operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
 {
+  typedef typename _Traits::char_type char_type;
   basic_string<_CharT, _Traits> __tmp;
   __tmp.reserve(_Nb);
 
@@ -864,8 +865,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
         break;
       }
       else {
-        char __c2 = _Traits::to_char_type(__c1);
-        char __c  = __is.narrow(__c2, '*');
+        char_type __c2 = _Traits::to_char_type(__c1);
+        char_type __c  = __is.narrow(__c2, '*');
 
         if (__c == '0' || __c == '1')
           __tmp.push_back(__c);