Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2006-08-30 15:26:43

"Andy Little" <andy_at_[hidden]> writes:

> BTW my plan is also to make a quaternion that is compatible with my Quan
> library:
> I did some test on complex quantities in a previous incarnation of Quan and
> there seemed to be no problems, so for instance one could do
> typedef complex<resistance> impedance;
> complex<voltage> v;
> complex<current> i
> impedance z = v / i;
> This is of course an entirely practical example.

Without knowing the details of your library, a well-designed generic
library usually defines non-intrusive concepts that allow any type to
satisfy the requirements, given some additional traits and functions.
There should be no need to write a new quaternion.

Dave Abrahams
Boost Consulting

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