Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Message-ID | <j2irqh$vt$1@dont-email.me> (permalink) |
|---|---|
| Newsgroups | comp.std.c++ |
| From | Daniel Krügler <daniel.kruegler@googlemail.com> |
| Subject | Re: Off by one error in std::reverse_copy for N3291=11-0061 25.3.10 |
| Organization | A noiseless patient Spider |
| References | <op.v0awnpej12d93i@deadyawn> |
| Date | 2011-08-18 07:53 -0600 |
On 2011-08-17 05:29, peter miller wrote: > > /* > Hi, > > the output of the program below should be: > > "three two one null \n" > > But when std::reverse_copy is implemented as described in > N3291=11-0061 25.3.10 [alg.reverse] it's: > > "null three two one \n" > > because there's an off by one error in 25.3.10/4; the definition should > read: > > *(result + (last - first) - 1 - i) = *(first + i) I agree with your problem analysis. Forwarded to the library working group. Greetings from Bremen, - Daniel Krügler -- [ comp.std.c++ is moderated. To submit articles, try posting with your ] [ newsreader. If that fails, use mailto:std-cpp-submit@vandevoorde.com ] [ --- Please see the FAQ before posting. --- ] [ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Back to comp.std.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Off by one error in std::reverse_copy for N3291=11-0061 25.3.10 "peter miller" <fuchsia.groan@virgin.net> - 2011-08-16 21:29 -0600
Re: Off by one error in std::reverse_copy for N3291=11-0061 25.3.10 Daniel Krügler <daniel.kruegler@googlemail.com> - 2011-08-18 07:53 -0600
Re: Off by one error in std::reverse_copy for N3291=11-0061 25.3.10 SG<s.gesemann@gmail.com> - 2011-08-24 14:06 -0700
Re: Off by one error in std::reverse_copy for N3291=11-0061 25.3.10 Daniel Krügler<daniel.kruegler@googlemail.com> - 2011-08-25 20:50 -0600
Re: Off by one error in std::reverse_copy for N3291=11-0061 25.3.10 "peter miller" <fuchsia.groan@virgin.net> - 2011-09-01 11:11 -0700
csiph-web