Hello,
I need some help with boost::units (here:
https://github.com/boostorg/units). I have been able to use the library for basic tasks as compute sin(theta) with theta in rad or deg and produce the same result. I then tried the custom object example provided in measurement.hpp (here:
https://github.com/boostorg/units/blob/develop/example/measurement.hpp), and here problems begin:
if I declare
quantity<plane_angle,measurement<double> > whatever;
all works as expected, but as soon as I declare
quantity<plane_angle,measurement<std::complex<double> > > whateverElse;
the file does not compile. I experienced the same with a custom 2 x 2 matrix class: if I use a <double> matrix all seem to work, but as soon as I use a <std::complex<double>> matrix the compiler complaints.
Does anyone have experience with this library? Which are the operators I must overload in a custom class in order to use if with units?
I put a (non) working example on GitHub (here:
https://github.com/oLazy/some_garbage/blob/devel/z1amt/matrix22.h) and I will gladly appreciate any help on this issue.