continuing units hijinks

K

kwikius

In the thread entitled "units hijinks"

http://groups.google.co.uk/group/comp.lang.c++/msg/a35e6011ad4776f1

you state:

"There has been no feedback from me, private or otherwise, about PQS/
Quan because, aside from looking very briefly at one or two of the
example programs which was enough to convince me that your design was
crap, I have no knowledge of those libraries or their internal
workings."

I have been looking back through the boost archives in relation to
what you said:

http://lists.boost.org/Archives/boost/2006/09/109849.php

In para 3 we have

"
will work and behave as expected... Currently this feature will only
work on gcc or other compilers that have already implemented typeof,
but I'm hoping that it will just be ignored on other platforms as
long as the code doesn't actually call operators with two different
types, assuming I've written the type conversion helpers right...
Eventually I'll look into Boost.Typeof, if there's enough interest.
For the most part, this feature is probably just a curiosity for the
average programmer, but it's a good test and allows more interesting
algebras to be associated with units...my demo code (mostly
functional except for power<N>/root<N>) is for a scaled value type
(something like Andy Little does internally) that carries with the
value type a base/exponent pair, so you could write values in
scientific notation like this :
5.67 x 10^7 -> scaled_value<float,scale<10,7> >(5.67) svalue;
Here, if you multiply this by itself, you get a new type:
svalue*svalue -> scaled_value<float,scale<10,14> >(5.67*5.67)
It's amusing and might actually be useful...

"
Particularly interesting is the part "(something like Andy Little does
internally)". This seems to conflict with your statement in:

http://groups.google.co.uk/group/comp.lang.c++/msg/a35e6011ad4776f1

"I have no knowledge of those libraries or their internal
workings"


I welcome your comments about these seemingly conflicting statements.


regards
Andy Little
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top