Index: uspace/lib/cpp/include/impl/istream.hpp
===================================================================
--- uspace/lib/cpp/include/impl/istream.hpp	(revision 25cc4a553cf4aeaf90c0eb9449ffe24008159c07)
+++ uspace/lib/cpp/include/impl/istream.hpp	(revision c1e11d32717f401a33e2674f929907ae92d6f89c)
@@ -155,45 +155,183 @@
             basic_istream<Char, Traits>& operator>>(bool& x)
             {
-                // TODO: implement
+                sentry sen{*this, false};
+
+                if (sen)
+                {
+                    using num_get = num_get<Char, istreambuf_iterator<Char, Traits>>;
+                    auto err = ios_base::goodbit;
+
+                    auto loc = this->getloc();
+                    use_facet<num_get>(loc).get(*this, 0, *this, err, x);
+                    this->setstate(err);
+                }
+
+                return *this;
             }
 
             basic_istream<Char, Traits>& operator>>(short& x)
             {
-                // TODO: implement
+                sentry sen{*this, false};
+
+                if (sen)
+                {
+                    using num_get = num_get<Char, istreambuf_iterator<Char, Traits>>;
+                    auto err = ios_base::goodbit;
+
+                    long tmp{};
+                    auto loc = this->getloc();
+                    use_facet<num_get>(loc).get(*this, 0, *this, err, tmp);
+
+                    if (tmp < numeric_limits<short>::min())
+                    {
+                        err |= ios_base::failbit;
+                        x = numeric_limits<short>::min();
+                    }
+                    else if (numeric_limits<short>::max() < tmp)
+                    {
+                        err |= ios_base::failbit;
+                        x = numeric_limits<short>::max();
+                    }
+                    else
+                        x = static_cast<short>(tmp);
+
+                    this->setstate(err);
+                }
+
+                return *this;
             }
 
             basic_istream<Char, Traits>& operator>>(unsigned short& x)
             {
-                // TODO: implement
+                sentry sen{*this, false};
+
+                if (sen)
+                {
+                    using num_get = num_get<Char, istreambuf_iterator<Char, Traits>>;
+                    auto err = ios_base::goodbit;
+
+                    auto loc = this->getloc();
+                    use_facet<num_get>(loc).get(*this, 0, *this, err, x);
+                    this->setstate(err);
+                }
+
+                return *this;
             }
 
             basic_istream<Char, Traits>& operator>>(int& x)
             {
-                // TODO: implement
+                sentry sen{*this, false};
+
+                if (sen)
+                {
+                    using num_get = num_get<Char, istreambuf_iterator<Char, Traits>>;
+                    auto err = ios_base::goodbit;
+
+                    long tmp{};
+                    auto loc = this->getloc();
+                    use_facet<num_get>(loc).get(*this, 0, *this, err, tmp);
+
+                    if (tmp < numeric_limits<int>::min())
+                    {
+                        err |= ios_base::failbit;
+                        x = numeric_limits<int>::min();
+                    }
+                    else if (numeric_limits<int>::max() < tmp)
+                    {
+                        err |= ios_base::failbit;
+                        x = numeric_limits<int>::max();
+                    }
+                    else
+                        x = static_cast<int>(tmp);
+
+                    this->setstate(err);
+                }
+
+                return *this;
             }
 
             basic_istream<Char, Traits>& operator>>(unsigned int& x)
             {
-                // TODO: implement
+                sentry sen{*this, false};
+
+                if (sen)
+                {
+                    using num_get = num_get<Char, istreambuf_iterator<Char, Traits>>;
+                    auto err = ios_base::goodbit;
+
+                    auto loc = this->getloc();
+                    use_facet<num_get>(loc).get(*this, 0, *this, err, x);
+                    this->setstate(err);
+                }
+
+                return *this;
             }
 
             basic_istream<Char, Traits>& operator>>(long& x)
             {
-                // TODO: implement
+                sentry sen{*this, false};
+
+                if (sen)
+                {
+                    using num_get = num_get<Char, istreambuf_iterator<Char, Traits>>;
+                    auto err = ios_base::goodbit;
+
+                    auto loc = this->getloc();
+                    use_facet<num_get>(loc).get(*this, 0, *this, err, x);
+                    this->setstate(err);
+                }
+
+                return *this;
             }
 
             basic_istream<Char, Traits>& operator>>(unsigned long& x)
             {
-                // TODO: implement
+                sentry sen{*this, false};
+
+                if (sen)
+                {
+                    using num_get = num_get<Char, istreambuf_iterator<Char, Traits>>;
+                    auto err = ios_base::goodbit;
+
+                    auto loc = this->getloc();
+                    use_facet<num_get>(loc).get(*this, 0, *this, err, x);
+                    this->setstate(err);
+                }
+
+                return *this;
             }
 
             basic_istream<Char, Traits>& operator>>(long long& x)
             {
-                // TODO: implement
+                sentry sen{*this, false};
+
+                if (sen)
+                {
+                    using num_get = num_get<Char, istreambuf_iterator<Char, Traits>>;
+                    auto err = ios_base::goodbit;
+
+                    auto loc = this->getloc();
+                    use_facet<num_get>(loc).get(*this, 0, *this, err, x);
+                    this->setstate(err);
+                }
+
+                return *this;
             }
 
             basic_istream<Char, Traits>& operator>>(unsigned long long& x)
             {
-                // TODO: implement
+                sentry sen{*this, false};
+
+                if (sen)
+                {
+                    using num_get = num_get<Char, istreambuf_iterator<Char, Traits>>;
+                    auto err = ios_base::goodbit;
+
+                    auto loc = this->getloc();
+                    use_facet<num_get>(loc).get(*this, 0, *this, err, x);
+                    this->setstate(err);
+                }
+
+                return *this;
             }
 
