Skip to content

Conversation

@e-kwsm
Copy link

@e-kwsm e-kwsm commented Jul 23, 2018

This PR uses

#define BOOST_UNITS_DEFINE_SINGLE_UNIT_SYSTEM(namespace_,unit_name_,dimension_) \
namespace boost { \
namespace units { \
namespace namespace_ { \
typedef make_system<unit_name_ ## _base_unit>::type unit_name_ ## system_; \
typedef unit<dimension_ ## _dimension,unit_name_ ## system_> unit_name_ ## _ ## dimension_; \
static constexpr unit_name_ ## _ ## dimension_ unit_name_ ## s; \
} \
} \
} \

This PR enables something like

boost::units::quantity<boost::units::si::pressure>
    p{760.0 * boost::units::metric::mmHg};

@e-kwsm e-kwsm changed the title Define single unit system Enable to Use Non-SI Untis Jul 23, 2018
@e-kwsm e-kwsm force-pushed the define-single-unit-system branch from c1f0c22 to 763f925 Compare July 23, 2018 12:08
@e-kwsm
Copy link
Author

e-kwsm commented Jul 23, 2018

list
  • angle::arcminute
  • angle::arcsecond
  • angle::degree
  • angle::gradian
  • angle::radian
  • angle::revolution
  • angle::steradian
  • astronomical::astronomical_unit
  • astronomical::light_day
  • astronomical::light_hour
  • astronomical::light_minute
  • astronomical::light_second
  • astronomical::light_year
  • astronomical::parsec
  • imperial::drachm
  • imperial::fluid_ounce
  • imperial::foot
  • imperial::furlong
  • imperial::gallon
  • imperial::gill
  • imperial::grain
  • imperial::hundredweight
  • imperial::inch
  • imperial::league
  • imperial::mile
  • imperial::ounce
  • imperial::pint
  • imperial::pound
  • imperial::quart
  • imperial::quarter
  • imperial::stone
  • imperial::thou
  • imperial::ton
  • imperial::yard
  • metric::angstrom
  • metric::are
  • metric::atmosphere
  • metric::bar
  • metric::barn
  • metric::day
  • metric::fermi
  • metric::hectare
  • metric::hour
  • metric::knot
  • metric::liter
  • metric::micron
  • metric::minute
  • metric::mmHg
  • metric::nautical_mile
  • metric::ton
  • metric::torr
  • metric::year
  • us::cup
  • us::dram
  • us::fluid_dram
  • us::fluid_ounce
  • us::foot
  • us::gallon
  • us::gill
  • us::grain
  • us::hundredweight
  • us::inch
  • us::mil
  • us::mile
  • us::minim
  • us::ounce
  • us::pint
  • us::pound
  • us::pound_force
  • us::quart
  • us::tablespoon
  • us::teaspoon
  • us::ton
  • us::yard

- angle::arcminute
- angle::arcsecond
- angle::degree
- angle::gradian
- angle::radian
- angle::revolution
- angle::steradian
- astronomical::astronomical_unit
- astronomical::light_day
- astronomical::light_hour
- astronomical::light_minute
- astronomical::light_second
- astronomical::light_year
- astronomical::parsec
- imperial::drachm
- imperial::fluid_ounce
- imperial::foot
- imperial::furlong
- imperial::gallon
- imperial::gill
- imperial::grain
- imperial::hundredweight
- imperial::inch
- imperial::league
- imperial::mile
- imperial::ounce
- imperial::pint
- imperial::pound
- imperial::quart
- imperial::quarter
- imperial::stone
- imperial::thou
- imperial::ton
- imperial::yard
- metric::angstrom
- metric::are
- metric::atmosphere
- metric::bar
- metric::barn
- metric::day
- metric::fermi
- metric::hectare
- metric::hour
- metric::knot
- metric::liter
- metric::micron
- metric::minute
- metric::mmHg
- metric::nautical_mile
- metric::ton
- metric::torr
- metric::year
- us::cup
- us::dram
- us::fluid_dram
- us::fluid_ounce
- us::foot
- us::gallon
- us::gill
- us::grain
- us::hundredweight
- us::inch
- us::mil
- us::mile
- us::minim
- us::ounce
- us::pint
- us::pound
- us::pound_force
- us::quart
- us::tablespoon
- us::teaspoon
- us::ton
- us::yard
@e-kwsm e-kwsm force-pushed the define-single-unit-system branch from 763f925 to ee58c28 Compare September 23, 2018 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant