small improvement for fill and fill_n

Paolo Carlini pcarlini@suse.de
Thu Jun 17 22:58:00 GMT 2004


Martin Sebor wrote:

> That would be one way to deal with it but as Nathan says, it may
> not be the most efficient way. I think it might be best to first
> approach this as an interpretation request: does the standard intend
> to require that the reference `value' be used in each iteration of
> the algorithm or is the implementations suggested by Dan permitted?
> In either case, do we (the committee) think that the existing text
> is  sufficiently clear to answer the question? (FWIW, I don't think
> it is, otherwise we wouldn't be having this discussion :-)

Ok, thanks for the clarification. Now my question (I often have this
doubt): is this a *known* issue? I mean: are there any DRs and/or are
you (or other people) going to officially raise it?

I'm asking because, as you can easily imagine, I'm afraid that some
implementors may consider the text clear and may implement right
away the optimization pointed out by Dan + Nathan (evaluating the
profitability basing on the cost of the copy).

Paolo.



More information about the Libstdc++ mailing list