diff --git a/AK/NonnullOwnPtr.h b/AK/NonnullOwnPtr.h index 7c8c7817f2..e9cc114be6 100644 --- a/AK/NonnullOwnPtr.h +++ b/AK/NonnullOwnPtr.h @@ -18,6 +18,8 @@ class WeakPtr; template class CONSUMABLE(unconsumed) NonnullOwnPtr { public: + typedef T ElementType; + enum AdoptTag { Adopt }; RETURN_TYPESTATE(unconsumed) diff --git a/AK/NonnullOwnPtrVector.h b/AK/NonnullOwnPtrVector.h index d1d7024b7b..d00644225c 100644 --- a/AK/NonnullOwnPtrVector.h +++ b/AK/NonnullOwnPtrVector.h @@ -6,7 +6,7 @@ namespace AK { template -class NonnullOwnPtrVector : public NonnullPtrVector, T, inline_capacity> +class NonnullOwnPtrVector : public NonnullPtrVector, inline_capacity> { }; diff --git a/AK/NonnullPtrVector.h b/AK/NonnullPtrVector.h index 345da11e08..2cc7147c4a 100644 --- a/AK/NonnullPtrVector.h +++ b/AK/NonnullPtrVector.h @@ -4,8 +4,9 @@ namespace AK { -template +template class NonnullPtrVector : public Vector { + typedef typename PtrType::ElementType T; typedef Vector Base; public: diff --git a/AK/NonnullRefPtr.h b/AK/NonnullRefPtr.h index 84719fd345..0cbb4ed8f9 100644 --- a/AK/NonnullRefPtr.h +++ b/AK/NonnullRefPtr.h @@ -26,9 +26,9 @@ inline void deref_if_not_null(T* ptr) template class CONSUMABLE(unconsumed) NonnullRefPtr { public: - enum AdoptTag { - Adopt - }; + typedef T ElementType; + + enum AdoptTag { Adopt }; RETURN_TYPESTATE(unconsumed) NonnullRefPtr(const T& object) diff --git a/AK/NonnullRefPtrVector.h b/AK/NonnullRefPtrVector.h index 1997e9fe45..38d137108b 100644 --- a/AK/NonnullRefPtrVector.h +++ b/AK/NonnullRefPtrVector.h @@ -6,7 +6,7 @@ namespace AK { template -class NonnullRefPtrVector : public NonnullPtrVector, T, inline_capacity> +class NonnullRefPtrVector : public NonnullPtrVector, inline_capacity> { };