|
Boost Users : |
Subject: [Boost-users] boost::units unit proposal
From: Michael Powell (mwpowellnm_at_[hidden])
Date: 2011-07-25 14:17:54
Boost::units developers / users,
I need to specify a U.S. Barrel (bbl) for purposes of performing conversions
and so forth.
First, does this definition look about right? Second, how does one propose
an addition to the units code base?
Note, I'm not quite sure how the 2^3 scaling from gallon to pints works in
terms of scaling from barrel to gallons, or pints for that matter, so I am
assuming that gallon can be the base unit for barrel and call it good.
Thoughts, questions, concerns?
namespace us {
typedef scaled_base_unit<gallon_base_unit, scale<42> >
barrel_base_unit;
} // namespace us
template<>
struct base_unit_info<us::barrel_base_unit> {
static const char* name() { return("bbl (U.S.)"); }
static const char* symbol() { return("bbl"); }
};
Thank you...
Regards,
Michael
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net