Boost logo

Boost :

From: Hugo Duncan (hugoduncan_at_[hidden])
Date: 2003-10-14 12:23:30

David Abrahams <dave_at_[hidden]> wrote:

> I don't see any MPL usage (other than conventions) in Hugo's
> example. Did you look at my slides?

I wouldn't like to try and implement it without MPL!

Having now looked at your slides, it is pretty much the same as
you propose, except that it does not use fixed dimensions,
instead using an explicit tag for each dimension.

   typedef list_c<int,1,0,0,0,0,0,0> mass;

   typedef vector< dimension_power< mass_tag, 1, 0> > mass;
   typedef vector< dimension_power< mass_tag, rational<1,0> > > mass;

   typedef list_c<int,0,1,-2,0,0,0,0> acceleration;
   typedef vector< dimension_power< length_tag, 1, 0>
                 , dimension_power< time_tag, -2, 0>
> acceleration;

ie. the system is open to any number of dimensions.


Boost list run by bdawes at, gregod at, cpdaniel at, john at