From: Hubert HOLIN (Hubert.Holin_at_[hidden])
Date: 2001-06-01 17:41:25
paris (U.E.), le 02/06/2001
--- In boost_at_y..., Jens Maurer <Jens.Maurer_at_g...> wrote:
> Hubert HOLIN wrote:
> > As far as I understand it, the unspecialized template class
> > complex is part of the standard, but it is its instanciation with a
> > type other than float, double and long double that has undefined
> > behaviour.
> No, it has unspecified behaviour. Section 1.3.12 of the standard says
> what "undefined" means and section 1.3.13 defines "unspecified".
> 26.2p2 says the effect of instantiating std::complex for anything
> else than "float", "double", and "long double" is unspecified.
> Therefore, even defining a variable of type, say, std::complex<int>,
> can do anything ranging from giving a diagnostic, to randomly
> corrupting the memory of the running process, to formatting your hard
> > I interpret this as: if T has the
> > algebraic properties of, say, float, then the algebraic properties of
> > complex<T> will be what are expected.
> I disagree.
> > I believe it would be worthwile, for the next iteration of
> > the standard, to be more explicit on that point, perhaps with clauses
> > of the style: this behaves "as if" it hab been coded thus and thus, but
> > with the possiblities of exceptions being generated.
> I don't think it's a defect in the standard, because, in this respect, it's
> sufficiently clear and unambiguous as written. If you wish to propose an
> extension for the next round of standardization or the upcoming library
> Technical Report, consider writing a detailed proposal, suitable to replace
> (specified parts of) section 26.2 of the standard. I'd be happy to
> forward it to the TR editor.
I do believe it would be worthwile. If there is no immediate
deadline (like less than two month or so), I'd like to do one. Are
there any specific guidelines as to how to proceed, format the thing
and so on?
> Also, you could consider joining the ISO committee. If you're from France,
> contact AFNOR for the details.
> Jens Maurer
That would be interesting. I would however, require the
agreement of my employer (Spare time? What's that? :-) ). If it costs
it money, that wont happen, ever... On the other hand, it's not like my
work seems to be so indispensable to it (I do work for a french semi-
administration, scientific and technical in nature). I'll try, but I
would not hold my breath waiting for success...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk