Boost logo

Boost Users :

Subject: Re: [Boost-users] [units] slowness dimension
From: Michael Powell (mwpowellhtx_at_[hidden])
Date: 2014-02-17 17:50:42

On Sun, Feb 16, 2014 at 7:30 PM, Gavin Lambert <gavinl_at_[hidden]> wrote:
> On 15/02/2014 03:49, Quoth Michael Powell:
>> I've learned about a "new" (or potentially new-to-boost-units, at any
>> rate) dimension this week. TBD whether we'll be using boost or even
>> units, but in the event we would, I'd like to add a slowness
>> dimension. Basically it is the inverse of velocity: where velocity is
>> time per length, slowness is length per time. Taking a gander at the
>> velocity.hpp physical dimension, doesn't seem like a terribly hard
>> thing to do, and with the new Git-module decomp, even less so today?
> It's fairly straightforward to define your own custom dimensions using
> Boost.Units, especially when they're based on the existing dimensions and
> base units.
> You can do this in your application code, without touching Boost.Units
> itself.

I get that. However that's why I mention it here in the event there's
some process for folding in other, potentially value-added physical
dimensions into the library.

> Have a look at boost/units/physical_dimensions/velocity.hpp and just define
> your new dimension similarly -- you can then define units (see
> boost/units/systems/si/velocity.hpp) and quantities using that and then
> everything else should automatically recognise it and just work.
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at