Boost logo

Boost :

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


"Matthias Troyer" <troyer_at_[hidden]> wrote in message
news:3BF6C3DF-9F29-4CCE-BF04-D97B8CADFE83_at_itp.phys.ethz.ch...

> 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 ;-)

regards
Andy Little


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk