Ejemplo n.º 1
0
basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>> (int& __val) {
#if 0 // This seems to work, but there doesn't seem to be any reason for it.
// BEGIN Android-removed.
  long __lval;
  _STLP_PRIV __get_num(*this, __lval);
  if ( this->fail() ) {
    return *this;
  }
  int __tmp = __lval;
  unsigned int __uval = __lval;
  // check if we lose digits
  //    if ((__val != __lval) && ((unsigned int)__val != __lval))
  if ((__tmp != __lval) && ((long)__uval != __lval))
    this->setstate(ios_base::failbit);
  else
    __val = __tmp;
  return *this;
// END Android-removed.
#else
  _STLP_PRIV __get_num(*this, __val);
  return *this;
#endif
}
Ejemplo n.º 2
0
basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>> (short& __val) {
#if 0 // This breaks __get_integer for short.
// BEGIN Android-removed.
  long __lval;
  _STLP_PRIV __get_num(*this, __lval);
  if ( this->fail() ) {
    return *this;
  }
  short __tmp = __STATIC_CAST(short, __lval);
  unsigned short __uval = __STATIC_CAST(unsigned short, __lval);
  // check if we lose digits
  //    if ((__val != __lval) && ((unsigned short)__val != __lval))
  if ((__tmp != __lval) && ((long)__uval != __lval))
    this->setstate(ios_base::failbit);
  else
    __val = __tmp;
  return *this;
// END Android-removed.
#else
  _STLP_PRIV __get_num(*this, __val);
  return *this;
#endif
}
Ejemplo n.º 3
0
basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>> (int& __val) {
  long __lval;
  _STLP_PRIV __get_num(*this, __lval);
  if ( this->fail() ) {
    return *this;
  }
  int __tmp = __lval;
  unsigned int __uval = __lval;
  // check if we lose digits
  //    if ((__val != __lval) && ((unsigned int)__val != __lval))
  if ((__tmp != __lval) && ((long)__uval != __lval))
    this->setstate(ios_base::failbit);
  else
    __val = __tmp;
  return *this;
}
Ejemplo n.º 4
0
basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>> (void*& __val) {
  _STLP_PRIV __get_num(*this, __val);
  return *this;
}
Ejemplo n.º 5
0
basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>> (unsigned _STLP_LONG_LONG& __val) {
  _STLP_PRIV __get_num(*this, __val);
  return *this;
}