Closed RallyTronics closed 6 years ago
Second line should be "kelvin", not "kelvin_t". The "_t" marks it as an actual unit container that has some numeric value, whereas the unit without the "_t" is more of a flag used for dimensional analysis.
Great, thanks!
I have the following test program and am using VS2017 `
include "units.h"
using namespace units; using namespace units::temperature; using namespace units::energy; using namespace units::substance; using namespace units::pressure; using namespace units::literals;
static constexpr const unit_t<compound_unit<joules, inverse>> enthalpy_of_vaporization_H2O(40660);
int main(void) { kelvin_t x = enthalpy_of_vaporization_H2O / constants::R; unit_t<inverse> ix = constants::R / enthalpy_of_vaporization_H2O;
}
`
compilation succeeds on the first line but fails on the second, what is the lhs type here?
thanks!
[edited to clarify]