Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2004-01-09 05:41:54


"Jan Langer" <jan_at_[hidden]> wrote in message
news:btlukg$oqv$5_at_sea.gmane.org...
> Andy Little wrote:
> > std::complex<q_impedance::R> Z=
> > std::complex<q_voltage::V>() / std::complex<q_current::I>().
> >
> > No idea if that would actually work though.... Anybody ...?
>
> it is correct. but i would prefer
>
> typedef std::complex <double> value_type;
> voltage <value_type> v (value_type (2, 3));
> current <value_type> i (value_type (1, 4));
> impedance <value_type> z = v / i;
>
> my point is just that std::complex <double> is the value type and should
> replace your implicit (i know its only for convenience) double.
> jan

Will try to compile and see what happens

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