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