mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:37:44 +00:00
AK: Add RefPtrTraits to allow implementing custom null pointers
This adds the ability to implement custom null states that allow storing state in null pointers.
This commit is contained in:
parent
4dd104607d
commit
3c1ef744f6
5 changed files with 131 additions and 71 deletions
|
@ -298,6 +298,11 @@ struct Conditional<false, TrueType, FalseType> {
|
|||
typedef FalseType Type;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct IsNullPointer : IsSame<decltype(nullptr), typename RemoveCV<T>::Type> {
|
||||
};
|
||||
|
||||
|
||||
template<typename T>
|
||||
struct RemoveReference {
|
||||
typedef T Type;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue