Get underling values of Fields#49
Conversation
|
@HKalbasi it seems Rust 1.91 has started printing thread IDs on panics, which is breaking our diff-based example testing. Any suggestions on how to proceed? I don't see an obvious way to turn off that panic behavior. |
|
Seems we may need #50 before merging this. |
Ah, this is rust-lang/rust#115746 . Let's use the stable compiler instead of nightly for now, and hope that they will make an option to disable this behavior before this hits stable. I like to avoid regex if possible, since it will break the ability of auto-fixing the tests. |
|
@HKalbasi I'm trying to figure out why |
|
IIRC examples enable lto with clang and use lld. Might be related. |
|
Well, I'm not sure why this PR broke it, but setting |
| These wrappers now act as their underlying type `T` in many contexts: | ||
|
|
||
| - `Ref<T>` construction from any `Field*<T, OFFSET>` | ||
| - Implicit read via `operator T()` and `.read()` for value-like access |
There was a problem hiding this comment.
Ah, good catch! Thanks.
Currently, it does not seem possible to read the underling value of zngur fields in C++. This PR adds support for converting a
Field<T>to aT, and adds corresponding docs and tests.