Prefixes.hh
Go to the documentation of this file.
23 // TODO find a way to import the prefixes into boca namespace without reimplementing them or including the full si namespace
25 using name ## _type = boost::units::make_scaled_unit<boost::units::si::dimensionless, boost::units::scale<10, boost::units::static_rational<exponent> > >::type; \
52 inline boost::units::quantity<quant, double > operator "" _##prefix##suffix(unsigned long long x) { \
53 return boost::units::quantity<quant, double >(static_cast<double>(x) * std::pow(10, exponent) * unit); \
55 static const boost::units::quantity<quant, double> prefix##suffix(1. * std::pow(10, exponent) * unit); \
116 // BOOST_UNITS_LITERAL_SET(degC, boost::units::si::temperature, boost::units::si::kelvin + 273.15 * boost::units::si::kelvin)
125 // BOOST_UNITS_LITERAL_SET(day, boost::units::si::time, 60. * 60. * 24. * boost::units::si::second)
Boost provides free peer-reviewed portable C++ source libraries.
Definition: LorentzVectorBase.hh:726
boost::units::unit< boost::units::area_dimension, System > Area
Definition: Barn.hh:24
#define BOOST_UNITS_LITERAL_SET(suffix, quant, unit)
Definition: Prefixes.hh:58
boost::units::quantity< electronvolt::Energy > Energy
Energy measured in electronvolt.
Definition: ElectronVolt.hh:56
#define BOOST_UNITS_METRIC_PREFIX_2(exponent, name)
Definition: Prefixes.hh:24