Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2006-09-01 04:13:23

"Matthias Troyer" <troyer_at_[hidden]> wrote in message

> Can't you just use std::complex<T> as value type in quan?

You can do:

quan::resistance<std::complex<> >:kR x;

but its preferable to do:

quan::complex<quan::resistance::kR> x;

I tried specialising/ overloading std::complex for quantities before but its
more work than just doing my own version, which will work with numeric types and
quantity types anyway.... and complex<double>(1) * 2; won't fail to compile in
my version ;-)

Andy Little

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