This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: small improvement for fill and fill_n
Hi Martin,
IMO, this sounds more like a library issue than a simple matter of
QoI. It's easily detectable whether the algorithm actually "Assigns
value through all the iterators..." as the standard specifies or not.
There are places in the library where the interface goes to extra
trouble (of using by-value arguments) to avoid this side-effect of
aliasing.
Thanks for your message: please confirm that I understand well your
point. You mean that the library (i.e., the Standard) should be perhaps
improved in this area to more carefully select a type of argument
passing (e.g., by value) that automatically avoids this kind of trouble?
Paolo.