Index: uspace/lib/cpp/include/impl/istream.hpp
===================================================================
--- uspace/lib/cpp/include/impl/istream.hpp	(revision 349b0f749c344cd512e25815859fdcd7069ce079)
+++ uspace/lib/cpp/include/impl/istream.hpp	(revision a1c35cc64c6d6c6777dd1cbae7d42be66e19b559)
@@ -571,4 +571,6 @@
                     }
                 }
+
+                return *this;
             }
 
@@ -605,4 +607,6 @@
                     s[gcount_++] = traits_type::to_char_type(c);
                 }
+
+                return *this;
             }
 
Index: uspace/lib/cpp/include/internal/locale.hpp
===================================================================
--- uspace/lib/cpp/include/internal/locale.hpp	(revision 349b0f749c344cd512e25815859fdcd7069ce079)
+++ uspace/lib/cpp/include/internal/locale.hpp	(revision a1c35cc64c6d6c6777dd1cbae7d42be66e19b559)
@@ -35,10 +35,4 @@
 {
     class locale;
-
-    template<class Facet>
-    const Facet& use_facet(const locale& loc);
-
-    template<class Facet>
-    bool has_facet(const locale& loc);
 
     /**
@@ -152,18 +146,18 @@
 
             template<class Facet>
-            friend const Facet& use_facet(const locale&);
+            /* friend const Facet& use_facet(const locale&); */
+            friend Facet use_facet(const locale&);
 
             template<class Facet>
-            const Facet& get_() const
+            /* const Facet& get_() const */
+            Facet get_() const
             {
-                // TODO: A VERY ugly hack, when we have map/shared ptr,
-                //       we should implement facets and store them in a map
-                //       and return them here by their IDs.
-                return *(new Facet{0u});
+                return Facet{0U};
             }
     };
 
     template<class Facet>
-    const Facet& use_facet(const locale& loc)
+    /* const Facet& use_facet(const locale& loc) */
+    Facet use_facet(const locale& loc)
     {
         return loc.get_<Facet>();
Index: uspace/lib/cpp/include/internal/locale/num_get.hpp
===================================================================
--- uspace/lib/cpp/include/internal/locale/num_get.hpp	(revision 349b0f749c344cd512e25815859fdcd7069ce079)
+++ uspace/lib/cpp/include/internal/locale/num_get.hpp	(revision a1c35cc64c6d6c6777dd1cbae7d42be66e19b559)
@@ -30,4 +30,6 @@
 #define LIBCPP_INTERNAL_LOCALE_NUM_GET
 
+#include <cerrno>
+#include <cstring>
 #include <internal/locale.hpp>
 #include <internal/locale/numpunct.hpp>
@@ -35,8 +37,4 @@
 #include <iterator>
 #include <limits>
-
-extern "C" {
-#include <errno.h>
-}
 
 namespace std
@@ -262,4 +260,5 @@
             {
                 // TODO: implement
+                return in;
             }
 
@@ -268,4 +267,5 @@
             {
                 // TODO: implement
+                return in;
             }
 
@@ -274,4 +274,5 @@
             {
                 // TODO: implement
+                return in;
             }
 
@@ -280,4 +281,5 @@
             {
                 // TODO: implement
+                return in;
             }
 
@@ -301,7 +303,7 @@
                     int ret{};
                     if constexpr (is_signed<BaseType>::value)
-                        ret = str_int64_t(base.buffer_, nullptr, num_base, false, &res);
-                    else
-                        ret = str_uint64_t(base.buffer_, nullptr, num_base, false, &res);
+                        ret = std::hel::str_int64_t(base.buffer_, nullptr, num_base, false, &res);
+                    else
+                        ret = std::hel::str_uint64_t(base.buffer_, nullptr, num_base, false, &res);
 
                     if (ret != EOK)
