small improvement for fill and fill_n
Paolo Carlini
pcarlini@suse.de
Thu Jun 17 19:34:00 GMT 2004
Nathan Myers wrote:
>Worse, I don't know if the extra copy is always allowed. Anyway it's
>easy to imagine a type for which it is would be too expensive to make
>extra copies. What we need is a way to assert explicitly that &value
>doesn't alias anything else. Failing that, we need a way to tell if
>copying is cheap and the value can be held in a register, so we can
>overload on that condition. I think there's some work on that last
>for C++0x.
>
>
Ah, ah! Indeed, I suspected that the cost of the copy had to be taken into
account, somehow...
Thanks, I'll try lo learn more about those issues,
Paolo.
More information about the Libstdc++
mailing list