This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Rethinking... (Re: RFC: fp printing speedup...)
Martin Sebor wrote:
...
Well, wait. What if ctype.widen looked like:
CharT widen(char) {
if (!cache) {
cache = getcache();
do_widen(cache.CharTarray, cache.chararry);
}
return cache.CharTarray[char];
}
Whoops, I just now noticed that you're calling the array form from the
non-array form. That's definitely not what the standard now requires.
Hmmm, the result should still be the same but since the functions are
allowed (or, AFAIK, are not disallowed to) have side-effects I don't
think the above would be kosher.
FWIW, this is another one of the inconsistencies caused by the virtual
functions I was referring to earlier, although this one is even more
wicked.
Martin