-
|
Dear, I try to assign a variable to another variable: I have: I can clearly see that the number (quantity) has been converted from I was wondering if it's possible to do the opposite: change the unit and the quantity of I don't think it's possible because Am I right ? Do you think this point should be added in the FAQ of mp-units ? I didn't read anything about this point in the documentation. I want to create a GUI with a user-defined value. The user may be able to select the unit. Thanks for you advise. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
For quantity types of the same dimension |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the answer. I wanted to avoid I didn't knew about |
Beta Was this translation helpful? Give feedback.
For quantity types of the same dimension
q0,q1, ...,qn, two possible options includestd::variant<q0, q1, ..., qn>andstd::common_type<q0, q1, ..., qn>.