Boost logo

Boost :

From: Hugo Duncan (hugoduncan_at_[hidden])
Date: 2003-10-10 09:58:20


Jeff Garland <jeff_at_[hidden]> wrote:

> Many concepts in the date_time domain, such
> as leap seconds, are defined by legislation instead of physics and hence
> create lots of difficulties.

This is a problem with a library that we use here. It defines
a quantity as a numeric type and a set of dimensions

   template <typename T, typename Dimensions> class quantity;

where dimensions contains a mpl type sequence, with each
element holding instances of

   template <
       typename DimensionType
     , long Numerator
     , long Denominator=1
> struct dimension_power

Each DimensionType is then assosciated with a unit.

This works very well with basic units (ie units for single dimensions of
unit
power), but starts to give problems for things like gallon which
is defined for (L^3).

> Jeff

Hugo


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk