|
Boost : |
From: J.F.K. (beholder_at_[hidden])
Date: 2004-01-06 00:53:04
----- Original Message -----
From: "Dan W." <danw_at_[hidden]>
Newsgroups: gmane.comp.lib.boost.devel
Sent: Tuesday, 06 January, 2004 05:09
Subject: Re: runtime
unit-modifiablephysical-quantitiesusingpqs1-00-01
>
> Ahhh! Yup, this is a conondrum; because I don't want to mix apples and
> bananas, and if I do I can cast them to fruits; but how does one prevent
> zero-power-units types from inter-converting? How about treating them
> specially? For all non-zero power dimension types, conversions could be
> template-instantiated as required; but zero power ones are typed as per
> the name the user gives them, and if two names don't match you need a
> cast or explicit conversion. Could this work? This could prevent taking
> the arc-cosine of Federal tax by accident.
>
stop here, please!
scalar is scalar, one could have an ability to write:
f = l1/l2 + v1/v2;
where l1 and l2 are lengths, v1 and v2 are velocities, and f
is a scalar of cause.
The idea was already arised in this thread:
if "Federal tax" is imortant entity in your program - you
could declare special dimention for it, and IMO it is a
convinient way to
> prevent taking
> the arc-cosine of Federal tax by accident.
preferred usage of units library for me:
* declare dimensions that'll be used in the program (Federal
tax, e.t.c.)
* write my program :)
Regards,
Oleg.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk