Early/late bound parameters and lifetime capturing

Hey folks,

I've read here:

(...) If an RPIT captures an in-scope lifetime, it forces it to be early-bound.

Is this correct in general? As I can nothing find about this on the dev guide page for early and late bound parameters.

... my assumption is that it actually is correct in general as it might be that an RPIT captures a lifetimes which is already concrete when the function can be used so you can no longer pass an arbitrary lifetime. Could this line of reasoning be correct?

Regards
keks

It's a bit more complicated, as the following comments explore. You can't have an unconstrained late-bound lifetime in the return type. But the mere presence of a lifetime-capturing RPIT doesn't cause early-boundedness.

You can follow my breadcrumbs from here.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.