If I understand the way quantity works correctly, this will take a quantity on any length dimension and convert it to a quantity on si::length. What I am attempting to do is manage quantities in units. What I mean by marshalling and demarshalling is this:
quantitysi::length marshall(double value) { return value * us::foot_base_unit(); }
double demarshall(const quantitysi::length& value) { return quantity*feet*/>(value).value(); }
If possible this is the approach I'd like to take,
If you just want to do "unsafe" conversions back and forth like you've written, why don't you just do it directly? quantitysi::length::from_value(value) quantityus::length(value).value() The advantage of using wrappers like I suggested earlier is that you then are insulated from the units-incompatible libraries while preserving their interface and guaranteeing (assuming you've written the wrappers correctly) that you maintain dimensional correctness... Maybe I'm just not understanding your use case. Matthias