Boost logo

Boost :

From: Guillaume Melquiond (gmelquio_at_[hidden])
Date: 2002-09-07 09:24:18

On 7 Sep 2002, Gabriel Dos Reis wrote:

> Guillaume Melquiond <gmelquio_at_[hidden]> writes:
> | > P.S.: I've seen another severe restriction, but I don't believe that this is
> | > a problem of the interval library. It isn't possible to instantiate
> | > std::complex<interval<float> >. How shall we cope with this?
> |
> | You are right, it's not a problem of the interval library. The C++
> | Standard says that "the effect of instantiating the template complex for
> | any type other than float, double or long double is unspecified" (26.2.2).
> | Not being able to instantiate complex<interval> because the Standard
> | decided the only interesting types are float, double and long double is
> | really a pity.
> Well, I think you're reading too much into the standard. The standard
> didn't decide the only interesting floating point types are float,
> double and long double.
> 1.3.13 unspecified behavior
> behavior, for a well-formed program construct and correct data, that
> depends on the implementation. The implementation is not required to
> document which behavior occurs. [Note: usually, the range of possible
> behaviors is delineated by this International Standard. ]
> In particular the standard doesn't prohibit instantiations on a
> numerical type T other than float, double and long double. It is up
> to the implementation to decide whether it supports such constructs.
> -- Gaby

No, I don't read too much into the Standard. I just find unusable a part
of a library whose behavior is not only "unspecified" by the Standard but
also "not required to [be] documented" by the implementation.


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