_Char is directly compared against _Elem0 and _Elem1
|
if (_Tr::eq_int_type(_Tr::eof(), _Meta)) { // end of file, quit
|
|
_State |= _Istr_t::eofbit;
|
|
break;
|
|
} else if ((_Char = _Tr::to_char_type(_Meta)) != _Elem0 && _Char != _Elem1) {
|
|
break; // invalid element
|
|
} else if (_Str.max_size() <= _Str.size()) { // no room in string, give up (unlikely)
|
|
_State |= _Istr_t::failbit;
|
|
break;
|
|
} else { // valid, append '0' or '1'
|
|
_Str.push_back('0' + (_Char == _Elem1));
|
|
_Changed = true;
|
|
}
|
_Charis directly compared against_Elem0and_Elem1STL/stl/inc/bitset
Lines 589 to 600 in 73b5791