Evaluate f()
and return its result, ensuring that x
is not
destroyed before f returns.
Declaration
func
withExtendedLifetime
<
T
,
Result
>
(
x
:
T
, @
noescape
_
f
: ()
throws
-
>
Result
)
rethrows
-
>
Result
Auto-generated documentation for Swift. Command-click no more.
Evaluate f()
and return its result, ensuring that x
is not
destroyed before f returns.
func
withExtendedLifetime
<
T
,
Result
>
(
x
:
T
, @
noescape
_
f
: ()
throws
-
>
Result
)
rethrows
-
>
Result
Evaluate
f(x)
and return its result, ensuring thatx
is not destroyed before f returns.Declaration
func
withExtendedLifetime
<
T
,
Result
>
(
x
:
T
, @
noescape
_
f
:
T
throws
-
>
Result
)
rethrows
-
>
Result