Topic: Should forward_list::erase_after really take an iterator parameter?
Author: "Bo Persson"<bop@gmb.dk>
Date: Tue, 19 Apr 2011 13:07:27 CST Raw View
In the latest document (N3290) erase_after has this signature:
iterator erase_after(const_iterator position, iterator last);
Is that by design, or should the second parameter be a const_iterator
as well? The latter looks more consistent.
Bo Persson
--
[ 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 ]
Author: =?ISO-8859-15?Q?Daniel_Kr=FCgler?=<daniel.kruegler@googlemail.com>
Date: Wed, 20 Apr 2011 14:05:01 CST Raw View
Am 19.04.2011 21:07, schrieb Bo Persson:
> In the latest document (N3290) erase_after has this signature:
>
> iterator erase_after(const_iterator position, iterator last);
>
> Is that by design, or should the second parameter be a const_iterator
> as well? The latter looks more consistent.
The last parameter should also be a const_iterator type, this was
resolved with
http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#897
The current state must be an editorial oversight (as I just see, it also
was part of N3242, maybe even further).
HTH& 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 ]