Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2004-03-13 20:02:22

Hi again,

pqs-1-00-03-boosted is available on the files section:

This version is designed for inclusion in the boost library tree. and uses
the namespace boost::pqs, where previous versions used physical-quantities.
Tested on VC7.1 and gcc3.2. Currently I am working on complex
physical-quantities which require a large number of operator overloads, and
cant be achieved without violating the standard. 26.2.6.(See the
q_complex.cpp and complex_example.cpp in examples for details of whats done
so far in complex area.)

Does pqs use mpl?

Some but not much. I have had difficulties using mpl in this context. Which
is basically to construct the return types of operators. I have found that
this type of thing does the job in a scaleable manner:


This computes a type and has a solitary result_type member which can be used
with result_of. It also scales rather well and has come in very useful for
complex physical-quanity definitions as well as my abstract_pq type. (see
boost/pqs/class_template/abstract_identity/abstract_pq/abstract_pq.hpp in
the distro for example of economies gained by this approach). Defining
binary_operation<A,Op,B> for two types also automatically enables use of the
binary_operator functors.(See boost/pqs/operators/binary_operators.hpp in
the distro for details on this.)

Major changes based on boost feedback

1) The namespace in this version has changed from physical_quantities to

2) A tag mechanism has been added to distinguish (say) torque from energy.
This works simply at the output level. See examples/torque_from_energy.cpp
for more details.

I still do not consider the library to be stable yet.(There may be a need
for yet another tag in the units) I dont have any tests included, and the
docs need a lot of work. At the moment it is still just for fun.

Andy little

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