Topic: N3000 Defect - inconsistent return values for forward_list::insert_after


Author: "Bo Persson" <bop@gmb.dk>
Date: Wed, 25 Nov 2009 17:35:13 CST
Raw View
After applying LDR#149, forward_list now has 5 overloads of
insert_after, all returning an iterator.

However, two of those - inserting a single object - return "An
iterator pointing to a copy of x [the inserted object]" while the
other three - inserting zero or more objects - return an iterator
equivalent to the position parameter, pointing before any possibly
inserted objects.

Is this the intended change?


I don't really know what insert_after(position, empty_range) should
really return, but always returning position seems less than useful.



Bo Persson



--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]