Boost logo

Boost :

From: Mohamed Iqbal (miqbal_at_[hidden])
Date: 2003-12-11 22:25:46


> > 26.2/2: The effect of instantiating the template complex for any type
> > other than float, double or long double is unspecified.
> >
> > isn't it fun?! <wink>
>
> Does anybody know the reason for that?

Some implementers wanted restrictions to ease very optimized
implementations, especually when it come to copying. It is a rather dumb
restriction. I use complex<int> but wouldn't try <complex<X> for a type X
with a copy constructor.

Another reason is: some of the mathematical operations are not meaningful if
you can't
represent a fractional value.

Mohammed


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