Index: uspace/lib/cpp/include/internal/memory/shared_payload.hpp
===================================================================
--- uspace/lib/cpp/include/internal/memory/shared_payload.hpp	(revision 09e02ee268b86546c776fc75381d00d7f8536dfa)
+++ uspace/lib/cpp/include/internal/memory/shared_payload.hpp	(revision de00da5a3ca2f1d462111955da782499cdba9ade)
@@ -49,4 +49,13 @@
     using refcount_t = long;
 
+    /**
+     * This allows us to construct shared_ptr from
+     * a payload pointer in make_shared etc.
+     */
+    struct payload_tag_t
+    { /* DUMMY BODY */ };
+
+    inline constexpr payload_tag_t payload_tag{};
+
     template<class D, class T>
     void use_payload_deleter(D* deleter, T* data)
Index: uspace/lib/cpp/include/internal/memory/shared_ptr.hpp
===================================================================
--- uspace/lib/cpp/include/internal/memory/shared_ptr.hpp	(revision 09e02ee268b86546c776fc75381d00d7f8536dfa)
+++ uspace/lib/cpp/include/internal/memory/shared_ptr.hpp	(revision de00da5a3ca2f1d462111955da782499cdba9ade)
@@ -76,5 +76,6 @@
             template<class U>
             explicit shared_ptr(
-                enable_if_t<is_convertible_v<U*, element_type*>, U*> ptr
+                U* ptr,
+                enable_if_t<is_convertible_v<U*, element_type*>>* = nullptr
             )
                 : payload_{}, data_{ptr}
@@ -94,5 +95,6 @@
             template<class U, class D>
             shared_ptr(
-                enable_if_t<is_convertible_v<U*, element_type*>, U*> ptr, D deleter
+                U* ptr, D deleter,
+                enable_if_t<is_convertible_v<U*, element_type*>>* = nullptr
             )
                 : shared_ptr{}
@@ -112,6 +114,6 @@
             template<class U, class D, class A>
             shared_ptr(
-                enable_if_t<is_convertible_v<U*, element_type*>, U*> ptr,
-                D deleter, A
+                U* ptr, D deleter, A,
+                enable_if_t<is_convertible_v<U*, element_type*>>* = nullptr
             )
                 : shared_ptr{}
@@ -141,6 +143,6 @@
             template<class U>
             shared_ptr(
-                enable_if_t<is_convertible_v<U*, element_type*>, const shared_ptr<U>&> other,
-                element_type* ptr
+                const shared_ptr<U>& other, element_type* ptr,
+                enable_if_t<is_convertible_v<U*, element_type*>>* = nullptr
             )
                 : payload_{other.payload_}, data_{ptr}
@@ -159,5 +161,6 @@
             template<class U>
             shared_ptr(
-                enable_if_t<is_convertible_v<U*, element_type*>, const shared_ptr<U>&> other
+                const shared_ptr<U>& other,
+                enable_if_t<is_convertible_v<U*, element_type*>>* = nullptr
             )
                 : payload_{other.payload_}, data_{other.data_}
@@ -176,5 +179,6 @@
             template<class U>
             shared_ptr(
-                enable_if_t<is_convertible_v<U*, element_type*>, shared_ptr<U>&&> other
+                shared_ptr<U>&& other,
+                enable_if_t<is_convertible_v<U*, element_type*>>* = nullptr
             )
                 : payload_{move(other.payload_)}, data_{move(other.data_)}
@@ -186,5 +190,6 @@
             template<class U>
             explicit shared_ptr(
-                enable_if_t<is_convertible_v<U*, element_type*>, const weak_ptr<U>&> other
+                const weak_ptr<U>& other,
+                enable_if_t<is_convertible_v<U*, element_type*>>* = nullptr
             )
             {
@@ -196,11 +201,11 @@
             template<class U, class D>
             shared_ptr(
+                unique_ptr<U, D>&& other,
                 enable_if_t<
                     is_convertible_v<
                         typename unique_ptr<U, D>::pointer,
                         element_type*
-                    >,
-                    unique_ptr<U, D>&&
-                > other
+                    >
+                >* = nullptr
             ) // TODO: if D is a reference type, it should be ref(other.get_deleter())
                 : shared_ptr{other.release(), other.get_deleter()}
@@ -238,7 +243,6 @@
 
             template<class U>
-            shared_ptr& operator=(
-                enable_if_t<is_convertible_v<U*, element_type*>, const shared_ptr<U>&> rhs
-            ) noexcept
+            enable_if_t<is_convertible_v<U*, element_type*>, shared_ptr>&
+            operator=(const shared_ptr<U>& rhs) noexcept
             {
                 if (rhs.payload_)
@@ -261,7 +265,5 @@
 
             template<class U>
-            shared_ptr& operator=(
-                enable_if_t<is_convertible_v<U*, element_type*>, shared_ptr<U>&&> rhs
-            ) noexcept
+            shared_ptr& operator=(shared_ptr<U>&& rhs) noexcept
             {
                 shared_ptr{move(rhs)}.swap(*this);
@@ -364,5 +366,5 @@
             element_type* data_;
 
-            shared_ptr(aux::shared_payload_base<element_type>* payload)
+            shared_ptr(aux::payload_tag_t, aux::shared_payload_base<element_type>* payload)
                 : payload_{payload}, data_{payload->get()}
             { /* DUMMY BODY */ }
@@ -409,4 +411,5 @@
     {
         return shared_ptr<T>{
+            aux::payload_tag,
             new aux::shared_payload<T>{forward<Args>(args)...}
         };
@@ -417,4 +420,5 @@
     {
         return shared_ptr<T>{
+            aux::payload_tag,
             new aux::shared_payload<T>{allocator_arg, A{alloc}, forward<Args>(args)...}
         };
Index: uspace/lib/cpp/include/internal/memory/weak_ptr.hpp
===================================================================
--- uspace/lib/cpp/include/internal/memory/weak_ptr.hpp	(revision 09e02ee268b86546c776fc75381d00d7f8536dfa)
+++ uspace/lib/cpp/include/internal/memory/weak_ptr.hpp	(revision de00da5a3ca2f1d462111955da782499cdba9ade)
@@ -192,5 +192,5 @@
             shared_ptr<T> lock() const noexcept
             {
-                return shared_ptr{payload_->lock()};
+                return shared_ptr{aux::payload_tag, payload_->lock()};
             }
 
