small improvement for fill and fill_n
Paolo Carlini
pcarlini@suse.de
Thu Jun 24 00:42:00 GMT 2004
Hi Dan and sorry for the delay...
>An obvious observation: if the standard was to require that the
>reference 'value' was to be used in each iteration then the
>specializations for "fill" in stl_algobase.h that use memset for
>one-byte types are incorrect.
>
In the light of your compelling observation, barring clarifications to
the standard, I'm testing the attached patch, which uses your idea only
when it will certainly pay off.
If nobody objects to the general approach, I will also add testcases,
of course, long missing.
Paolo.
/////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_fill
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040624/3fe33144/attachment.ksh>
More information about the Libstdc++
mailing list