diff --git a/AK/TypeCasts.h b/AK/TypeCasts.h index bd55da03d1a..5c95fb3ff23 100644 --- a/AK/TypeCasts.h +++ b/AK/TypeCasts.h @@ -73,10 +73,21 @@ ALWAYS_INLINE CopyConst* as(InputType* input) return result; } +template +ALWAYS_INLINE CopyConst* bridge_cast(InputType input) +{ +#ifdef AK_HAS_OBJC_ARC + return (__bridge CopyConst*)(input); +#else + return static_cast*>(input); +#endif +} + } #if USING_AK_GLOBALLY using AK::as; using AK::as_if; +using AK::bridge_cast; using AK::is; #endif