Index: uspace/lib/cpp/include/__bits/functional/bind.hpp
===================================================================
--- uspace/lib/cpp/include/__bits/functional/bind.hpp	(revision ddd287dc2aac1957273c2dabebaa4bf45369f764)
+++ uspace/lib/cpp/include/__bits/functional/bind.hpp	(revision 69cc156f04ce61a5e531de44a1b59899507959ec)
@@ -163,6 +163,6 @@
                 }
 
-            private:
-                function<decay_t<F>> func_;
+            private: // TODO: This has problem with member function pointers.
+                function<remove_reference_t<F>> func_;
                 tuple<decay_t<Args>...> bound_args_;
 
@@ -183,5 +183,5 @@
                     bind_arg_filter<ActualArgs...> filter{forward<ActualArgs>(args)...};
 
-                    return aux::invoke(
+                    return aux::INVOKE(
                         func_,
                         filter[get<Is>(bound_args_)]...
Index: uspace/lib/cpp/include/__bits/functional/invoke.hpp
===================================================================
--- uspace/lib/cpp/include/__bits/functional/invoke.hpp	(revision ddd287dc2aac1957273c2dabebaa4bf45369f764)
+++ uspace/lib/cpp/include/__bits/functional/invoke.hpp	(revision 69cc156f04ce61a5e531de44a1b59899507959ec)
@@ -52,5 +52,5 @@
 
     template<class R, class T, class T1, class... Ts>
-    decltype(auto) invoke(R T::* f, T1&& t1, Ts&&... args)
+    decltype(auto) INVOKE(R T::* f, T1&& t1, Ts&&... args)
     {
         if constexpr (is_member_function_pointer<decltype(f)>::value)
@@ -88,5 +88,5 @@
 
     template<class F, class... Args>
-    decltype(auto) invoke(F&& f, Args&&... args)
+    decltype(auto) INVOKE(F&& f, Args&&... args)
     {
         // (1.5)
Index: uspace/lib/cpp/include/__bits/functional/reference_wrapper.hpp
===================================================================
--- uspace/lib/cpp/include/__bits/functional/reference_wrapper.hpp	(revision ddd287dc2aac1957273c2dabebaa4bf45369f764)
+++ uspace/lib/cpp/include/__bits/functional/reference_wrapper.hpp	(revision 69cc156f04ce61a5e531de44a1b59899507959ec)
@@ -75,7 +75,7 @@
 
             template<class... Args>
-            result_of_t<type&(Args&&...)> operator()(Args&&... args) const
+            decltype(auto) operator()(Args&&... args) const
             {
-                return invoke(*data_, std::forward<Args>(args)...);
+                return aux::INVOKE(*data_, std::forward<Args>(args)...);
             }
 
Index: uspace/lib/cpp/include/__bits/test/tests.hpp
===================================================================
--- uspace/lib/cpp/include/__bits/test/tests.hpp	(revision ddd287dc2aac1957273c2dabebaa4bf45369f764)
+++ uspace/lib/cpp/include/__bits/test/tests.hpp	(revision 69cc156f04ce61a5e531de44a1b59899507959ec)
@@ -274,4 +274,15 @@
             const char* name() override;
     };
+
+    class functional_test: public test_suite
+    {
+        public:
+            bool run(bool) override;
+            const char* name() override;
+        private:
+            void test_reference_wrapper();
+            void test_function();
+            void test_bind();
+    };
 }
 
Index: uspace/lib/cpp/include/__bits/type_traits/result_of.hpp
===================================================================
--- uspace/lib/cpp/include/__bits/type_traits/result_of.hpp	(revision ddd287dc2aac1957273c2dabebaa4bf45369f764)
+++ uspace/lib/cpp/include/__bits/type_traits/result_of.hpp	(revision 69cc156f04ce61a5e531de44a1b59899507959ec)
@@ -62,5 +62,5 @@
             is_class<typename decay<F>::type>::value ||
             is_member_pointer<typename decay<F>::type>::value,
-            decltype(aux::invoke(declval<F>(), declval<ArgTypes>()...))
+            decltype(aux::INVOKE(declval<F>(), declval<ArgTypes>()...))
         >::type
     >
Index: uspace/lib/cpp/include/impl/functional.hpp
===================================================================
--- uspace/lib/cpp/include/impl/functional.hpp	(revision ddd287dc2aac1957273c2dabebaa4bf45369f764)
+++ uspace/lib/cpp/include/impl/functional.hpp	(revision 69cc156f04ce61a5e531de44a1b59899507959ec)
@@ -46,5 +46,5 @@
     decltype(auto) invoke(F&& f, Args&&... args)
     {
-        return aux::invoke(forward<F>(f)(forward<Args>(args)...));
+        return aux::INVOKE(forward<F>(f)(forward<Args>(args)...));
     }
 
@@ -67,5 +67,5 @@
                 decltype(auto) operator()(Args&&... args)
                 {
-                    return invoke(func_, forward<Args>(args)...);
+                    return INVOKE(func_, forward<Args>(args)...);
                 }
 
Index: uspace/lib/cpp/include/impl/mutex.hpp
===================================================================
--- uspace/lib/cpp/include/impl/mutex.hpp	(revision ddd287dc2aac1957273c2dabebaa4bf45369f764)
+++ uspace/lib/cpp/include/impl/mutex.hpp	(revision 69cc156f04ce61a5e531de44a1b59899507959ec)
@@ -791,5 +791,5 @@
             // TODO: exception handling
 
-            aux::invoke(forward<Callable>(func), forward<Args>(args)...);
+            aux::INVOKE(forward<Callable>(func), forward<Args>(args)...);
             flag.called_ = true;
         }
