Info
This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Accessng thread local varialbes from generic functions
I have a case where I need a thread local variable for each of a set of (floating point type, unsigned integer type). Currently, for f64 and u32, I call it THIS_THREAD_TAPE_F64_U32
.
I cannot figure out how to write a generic function, e.g. my_fun<F, U>, that can access the tape corresponding to the floating point type F and the unsigned integer type U ?
2 posts - 2 participants
🏷️ rust_feed