mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-21 10:05:32 +00:00
AK: Specialise AK::is() for NNRP<T>
This is used by the Jakt runtime.
This commit is contained in:
parent
18bc88b806
commit
fc805e8f03
|
@ -7,6 +7,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Assertions.h>
|
||||
#include <AK/Forward.h>
|
||||
#include <AK/Platform.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
|
||||
|
@ -27,6 +28,12 @@ ALWAYS_INLINE bool is(InputType* input)
|
|||
return input && is<OutputType>(*input);
|
||||
}
|
||||
|
||||
template<typename OutputType, typename InputType>
|
||||
ALWAYS_INLINE bool is(NonnullRefPtr<InputType> const& input)
|
||||
{
|
||||
return is<OutputType>(*input);
|
||||
}
|
||||
|
||||
template<typename OutputType, typename InputType>
|
||||
ALWAYS_INLINE CopyConst<InputType, OutputType>* verify_cast(InputType* input)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue