[Patch] Fix the narrow/widen problem in money_get::do_get

Nathan Myers ncm-nospam@cantrip.org
Thu Feb 26 18:39:00 GMT 2004


On Thu, Feb 26, 2004 at 07:23:43PM +0100, Paolo Carlini wrote:
> this is the last missing bit of work, actually for a bug: the
> standard is pretty clear that ctype::widen must be used in do_get,
> not ctype::narrow (see 22.2.6.1.2, p4 and note 237).
> 
> Interestingly, overall, the performance are not affected negatively,

I should hope so.  The purpose of that fillip (if I have identified it
correctly, from memory) was specifically to permit optimization.  Note 
that there has been some effort in committee to forbid it, because the 
commercial vendors hadn't exploited the opportunity, and (apparently) 
didn't want competition from anyone who had.

I'm happy to see that this opportunity has finally begun to be
exploited.  Go Free Software!  Now that an implementation does 
exploit it, it should be much harder to justify forbidding it.

Nathan Myers
ncm-nospam@cantrip.org



More information about the Libstdc++ mailing list