diff --git a/AK/Swift.h b/AK/Swift.h index 4f9855b0783..053ec38be66 100644 --- a/AK/Swift.h +++ b/AK/Swift.h @@ -37,3 +37,11 @@ # define SWIFT_RETURNS_RETAINED # define SWIFT_RETURNS_UNRETAINED #endif + +// FIXME: This needs to be in the global namespace for reasons +// https://github.com/swiftlang/swift/issues/80231 +template +To cxxCast(From i) +{ + return static_cast(i); +}