Not sure, but consider that lifetimes do not only appear in function declarations, but also in types. Assuming a model similar to Rust’s, lifetimes are generic parameters that aren’t necessarily tied to a particular variable’s name.
I'm not sure what you mean as I don't know Rust, but I was thinking lifetimeof() would give an object of scalar type, so you could pass it as a non type template param
View all comments
Show parent comment
-1
u/simonask_ Oct 25 '24
Not sure, but consider that lifetimes do not only appear in function declarations, but also in types. Assuming a model similar to Rust’s, lifetimes are generic parameters that aren’t necessarily tied to a particular variable’s name.