```
basic_istream& operator>>(unsigned short& val);
basic_istream& operator>>(unsigned int& val);
basic_istream& operator>>(long& val);
basic_istream& operator>>(unsigned long& val);
basic_istream& operator>>(long long& val);
basic_istream& operator>>(unsigned long long& val);
basic_istream& operator>>(float& val);
basic_istream& operator>>(double& val);
basic_istream& operator>>(long double& val);
basic_istream& operator>>(bool& val);
basic_istream& operator>>(void*& val);
```

As in the case of the inserters, these extractors depend on the
locale's
num_get<> object to perform parsing the input
stream data.

These extractors behave as formatted input functions (as described in [istream.formatted.reqmts]).

After a sentry object is constructed, the
conversion occurs as if performed by the following code fragment:
using numget = num_get<charT, istreambuf_iterator<charT, traits>>;
iostate err = iostate::goodbit;
use_facet<numget>(loc).get(*this, 0, *this, err, val);
setstate(err);

Class
locale
relies on this
type as its interface to
istream,
so that it does not need to depend directly on
istream.

```
basic_istream& operator>>(short& val);
```

The conversion occurs as if performed by the following code fragment
(using the same notation as for the preceding code fragment):
using numget = num_get<charT, istreambuf_iterator<charT, traits>>;
iostate err = ios_base::goodbit;
long lval;
use_facet<numget>(loc).get(*this, 0, *this, err, lval);
if (lval < numeric_limits<short>::min()) {
err |= ios_base::failbit;
val = numeric_limits<short>::min();
} else if (numeric_limits<short>::max() < lval) {
err |= ios_base::failbit;
val = numeric_limits<short>::max();
} else
val = static_cast<short>(lval);
setstate(err);

```
basic_istream& operator>>(int& val);
```

The conversion occurs as if performed by the following code fragment
(using the same notation as for the preceding code fragment):
using numget = num_get<charT, istreambuf_iterator<charT, traits>>;
iostate err = ios_base::goodbit;
long lval;
use_facet<numget>(loc).get(*this, 0, *this, err, lval);
if (lval < numeric_limits<int>::min()) {
err |= ios_base::failbit;
val = numeric_limits<int>::min();
} else if (numeric_limits<int>::max() < lval) {
err |= ios_base::failbit;
val = numeric_limits<int>::max();
} else
val = static_cast<int>(lval);
setstate(err);

`basic_istream& operator>>(`*extended-floating-point-type*& val);

Otherwise, let FP be a standard floating-point type:

- if the floating-point conversion rank of
*extended-floating-point-type*is less than or equal to that of float, then FP is float, - otherwise,
if the floating-point conversion rank of
*extended-floating-point-type*is less than or equal to that of double, then FP is double, - otherwise, FP is long double.

The conversion occurs as if performed by the following code fragment
(using the same notation as for the preceding code fragment):
using numget = num_get<charT, istreambuf_iterator<charT, traits>>;
iostate err = ios_base::goodbit;
FP fval;
use_facet<numget>(loc).get(*this, 0, *this, err, fval);
if (fval < -numeric_limits<*extended-floating-point-type*>::max()) {
err |= ios_base::failbit;
val = -numeric_limits<*extended-floating-point-type*>::max();
} else if (numeric_limits<*extended-floating-point-type*>::max() < fval) {
err |= ios_base::failbit;
val = numeric_limits<*extended-floating-point-type*>::max();
} else {
val = static_cast<*extended-floating-point-type*>(fval);
}
setstate(err);

[*Note 2*: *end note*]

When the extended floating-point type has
a floating-point conversion rank
that is not equal to the rank of any standard floating-point type,
then double rounding during the conversion can result in inaccurate results.

from_chars can be used in situations
where maximum accuracy is important.

â€”