[FYI] A "problem" in money_get/money_put/time_put

Paolo Carlini pcarlini@suse.de
Tue Feb 17 20:15:00 GMT 2004


Hi,

I was about to start working on caching for the monetary and time facets
when I paid more attention to this comment in num_get::do_get(bool&):

    ...

    // Parse bool values as long.
    // NB: We can't just call do_get(long) here, as it might
    // refer to a derived class.
    long __l = -1;
    __beg = _M_extract_int(__beg, __end, __io, __err, __l);

    ...

... then noticed that in money_get/money_put and time_put we are *not*
following this very good advice, sigh! For instance, money_get::do_get(long
double&) calls, as if it were an helper, money_get::do_get(string_type&),
and similar things happen in money_put and time_put.

So... shish... in the first place I have to restructure the facets to
avoid that... If someone thinks that I'm wrong, speak now to spare me a
good amount of unanticipated work (unlikely, I'm afraid...:(

Paolo.



More information about the Libstdc++ mailing list