What is evaluated first by eval? reads or writes? The order matters, especially when the same register/field is written and read.
Currently, the default behavior is to read first and return the "old" value, as it doesn't make sense to return value being written. This issue introduces choice to the user:
// return old value of mode
auto v = eval<pre>(cfg.mode, cfg.mode = 1_f);
// return read value of mode after write
auto v = eval<post>(cfg.mode, cfg.mode = 1_f);
What is evaluated first by
eval? reads or writes? The order matters, especially when the same register/field is written and read.Currently, the default behavior is to read first and return the "old" value, as it doesn't make sense to return value being written. This issue introduces choice to the user: