|
Boost : |
From: Thomas Witt (witt_at_[hidden])
Date: 2003-03-14 04:14:50
Kevlin,
Kevlin Henney wrote:
> In article <uadfzytkt.fsf_at_[hidden]>, David Abrahams
>>
>>Without a documentation update?!?
>
>
> The documentation is the same as it was yesterday. The change was in the
> implementation and not the interface, which is what is documented.
As said before I am not trying to block the lexical_cast update for
1_30_0. That's beyond my power anyway. I'll try to rephrase my criticism
to be a bit more constructive.
That said I do have serious concerns with regard to the documentation. I
would really appreciate it if you could comment on the following issues.
All quotations from the current documentation.
In general I do think a paragraph describing the changes in semantics
with respect to the prior version is missing. To me this is a must. IIUC
there are wchar_t support aside two significant changes in semantics.
First conversions to std::basic_string and second precision of floating
point output. The change in floating point precision handling might be
surprising to some users. Especially to those who use lexical_cast for
output formatting.
In detail:
"Returns the result of streaming arg into a std::stringstream and then
out as a Target object".
IIUC this is false for conversions to std::basic_string. If I read the
code correctly std::getline is used to extract the string from the
stream. There is a big semantic difference to using operator>> as
implied by the above sentence. BTW why isn't streamobject.str() used to
extract the string? I do think this needs to be documented and a
rationale describing why the current semantics were choosen would be
really helpfull in understanding lexical_cast and the involved problems.
"Note that spaces are significant in any conversion and are not skipped."
I think this sentence was the main reason why I got the impression that
you didn't change the documentation at all. To me it is easily
misunderstood for someone who is aware of the problems with string
streaming. To me this sentence implies that
lexical_cast<string>("U U");
does not work. I.e. whitespace is significant.
Thanks in advance
Thomas
-- Dipl.-Ing. Thomas Witt Institut fuer Verkehrswesen, Eisenbahnbau und -betrieb, Universitaet Hannover voice: +49(0) 511 762 - 4273, fax: +49(0) 511 762-3001 http://www.ive.uni-hannover.de
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk