Boost logo

Boost Users :

Subject: [Boost-users] [units] Conversions from quantities
From: Michael Powell (mwpowellhtx_at_[hidden])
Date: 2015-08-12 18:39:12


Just wanted to clarify something. These should convert from given
quantities to the desired units?

unit_conversion::from_length_to_inches(quantity<length> const & L) {
                const quantity<inch_base_unit::unit_type> result_(L);
                return result_.value();

            double unit_conversion::from_mass_to_pounds(quantity<mass>
const & M) {
                const quantity<ounce_base_unit::unit_type> result_(M);
                return result_.value();

>From an earlier post, I think maybe so, but I was interested in expert
opinions, as well.!topic/boost-list/YDJoMcu1Xx4

Thank you...

Best regards,

Michael Powell

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at