mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 00:47:45 +00:00
AK: Simplify NonnullPtrVector template a bit.
Add an "ElementType" typedef to NonnullOwnPtr and NonnullRefPtr to allow clients to easily find the pointee type. Then use this to remove a template argument from NonnullPtrVector. :^)
This commit is contained in:
parent
10d120dc85
commit
6a5446d6dd
5 changed files with 9 additions and 6 deletions
|
@ -18,6 +18,8 @@ class WeakPtr;
|
|||
template<typename T>
|
||||
class CONSUMABLE(unconsumed) NonnullOwnPtr {
|
||||
public:
|
||||
typedef T ElementType;
|
||||
|
||||
enum AdoptTag { Adopt };
|
||||
|
||||
RETURN_TYPESTATE(unconsumed)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue